Datasource APIs
List datasources
Get the id, name and status of every datasource in your organization.
GET
Use the id to sync a datasource and the name in every other datasource call. Credentials are never returned.
curl "https://api.usedatabrain.com/api/v2/datasource?isPagination=true&pageNumber=1" \ --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"Auth
A service token. See Authentication.
ApiTokenheader
AuthorizationBearer <token>A service token or a data app API token.
Query
isPaginationstring
true returns 10 datasources per page. Without it you get all of them.
One of:
truefalseThe order is not fixed, and there is no total count. Without pagination you get the full list in one response.
Response
{ "data": [ { "id": "6f1c2b9e-4d3a-4f8e-9b7c-2a1d0e5f6c7b", "name": "Sales warehouse", "isAuthenticated": true, "isDisabled": false } ]}| Field | Type | Description |
|---|---|---|
id | string | The datasource id |
name | string | The datasource name |
isAuthenticated | boolean | The last connection test passed |
isDisabled | boolean | The datasource is turned off |
Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | pageNumber is not a whole number from 1 |
For errors that every endpoint returns, see Authentication.
curl -X GET 'https://api.usedatabrain.com/api/v2/datasource'Example Response
{ "data": [ { "id": "6f1c2b9e-4d3a-4f8e-9b7c-2a1d0e5f6c7b", "name": "Sales warehouse", "isAuthenticated": true, "isDisabled": false } ]}