GET /source

[info] DEPRECATED
Use the Catalog API instead. The Source API will be removed in a future release.

Lists all sources. See Source for details on object representations.

Syntax

Operation URI
Lists all sources. GET /api/v3/source
Retrieves a specific source. GET /api/v3/source/{id}
GET /api/v3/source

Response Output

{
  "data": [
     source,
     ...
  ]
}

Response Codes

401 - user does not have permission to view the source.
404 - a source with the specified id could not be found.

Example: Get source

In this example, information about all of the source entities is requested. The host is a single node and the data is the Dremio sample source data.

In this case, there were two duplicate sources: Samples and Samples (1).

  • Sample has ID e4c0ed8b-d189-4d2c-a991-dc0daec75bf0.
  • Samples (1) has ID a24cf314-6305-49cf-9b4e-f7da55f8044d.

Postman is used to generate the examples.

Curl Request

curl -X GET \
  http://localhost:9047/api/v3/source \
  -H 'Authorization: _dremioerjt7vnhtljpus01rfibddefdg' \
  -H 'Postman-Token: 190f4071-c455-4f18-9616-10073ae56a19' \
  -H 'cache-control: no-cache'

Python Request

import requests

url = "http://localhost:9047/api/v3/source"

payload = ""
headers = {
    'Authorization': "_dremioerjt7vnhtljpus01rfibddefdg",
    'cache-control': "no-cache",
    'Postman-Token': "d4a1e70d-ef8b-45bf-931d-d3c0f3619334"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)

Response

{
    "data": [
        {
            "entityType": "SourceResource$SourceDeprecated",
            "config": {
                "accessKey": "",
                "accessSecret": "$DREMIO_EXISTING_VALUE$",
                "secure": false,
                "externalBucketList": [
                    "samples.dremio.com"
                ],
                "allowCreateDrop": false,
                "rootPath": "/",
                "credentialType": "NONE"
            },
            "state": {
                "status": "good",
                "messages": []
            },
            "id": "e4c0ed8b-d189-4d2c-a991-dc0daec75bf0",
            "tag": "0",
            "type": "S3",
            "name": "Samples",
            "createdAt": "2019-02-05T01:20:05.213Z",
            "metadataPolicy": {
                "authTTLMs": 86400000,
                "namesRefreshMs": 3600000,
                "datasetRefreshAfterMs": 3600000,
                "datasetExpireAfterMs": 10800000,
                "datasetUpdateMode": "PREFETCH_QUERIED",
                "deleteUnavailableDatasets": true,
                "autoPromoteDatasets": false
            },
            "accelerationGracePeriodMs": 10800000,
            "accelerationRefreshPeriodMs": 3600000,
            "accelerationNeverExpire": false,
            "accelerationNeverRefresh": false,
            "_type": "source"
        },
        {
            "entityType": "SourceResource$SourceDeprecated",
            "config": {
                "accessKey": "",
                "accessSecret": "$DREMIO_EXISTING_VALUE$",
                "secure": false,
                "externalBucketList": [
                    "samples.dremio.com"
                ],
                "allowCreateDrop": false,
                "rootPath": "/",
                "credentialType": "NONE"
            },
            "state": {
                "status": "good",
                "messages": []
            },
            "id": "a24cf314-6305-49cf-9b4e-f7da55f8044d",
            "tag": "0",
            "type": "S3",
            "name": "Samples (1)",
            "createdAt": "2019-02-05T01:20:13.134Z",
            "metadataPolicy": {
                "authTTLMs": 86400000,
                "namesRefreshMs": 3600000,
                "datasetRefreshAfterMs": 3600000,
                "datasetExpireAfterMs": 10800000,
                "datasetUpdateMode": "PREFETCH_QUERIED",
                "deleteUnavailableDatasets": true,
                "autoPromoteDatasets": false
            },
            "accelerationGracePeriodMs": 10800000,
            "accelerationRefreshPeriodMs": 3600000,
            "accelerationNeverExpire": false,
            "accelerationNeverRefresh": false,
            "_type": "source"
        }
    ]
}

results matching ""

    No results matching ""