Data Retrieval
Fetch dashboards by data app
List the dashboards a data app embeds, with their embed ids.
GET
curl "https://api.usedatabrain.com/api/v2/data-app/dashboards?dashboardNames=Sales%20overview,Churn" \ --header "Authorization: Bearer $DATABRAIN_API_TOKEN"Auth
A data app API token. A service token gets 400 INVALID_DATA_APP_API_KEY. See Authentication.
DataAppApiTokenheader
AuthorizationBearer <token>A data app API token. A service token is refused.
Query
dashboardNamesstring
Dashboard names, split by commas with no spaces around them. Only these are returned.
isPaginationstring
true returns 10 rows per page.
POST /api/v2/data-app/dashboards does the same with a JSON body: { "isPagination": true, "pageNumber": 1, "filters": { "dashboardNames": ["Sales overview"] } }.
Response
{ "data": [ { "name": "Sales overview", "externalDashboardId": "sales-overview", "embedId": "sales-overview" } ]}There is one row per dashboard embed. A dashboard with two embeds is listed twice. The order is not fixed.
Errors
| Status | error.code | Why |
|---|---|---|
| 400 | INVALID_REQUEST_BODY | A field is wrong or unknown |
| 400 | INVALID_DATA_APP_API_KEY | You used a service token |
| 500 | INTERNAL_SERVER_ERROR | The list could not be read |
For errors that every endpoint returns, see Authentication.
curl -X GET 'https://api.usedatabrain.com/api/v2/data-app/dashboards'Example Response
{ "data": [ { "name": "Sales overview", "externalDashboardId": "sales-overview", "embedId": "sales-overview" } ]}