Skip to Content

Data Retrieval

Fetch dashboards by data app

List the dashboards a data app embeds, with their embed ids.

GET
/api/v2/data-app/dashboards
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.

Authorization

DataAppApiToken
headerAuthorizationBearer <token>

A data app API token. A service token is refused.

Query

Dashboard names, split by commas with no spaces around them. Only these are returned.

true returns 10 rows per page.

pageNumberinteger

Page, from 1

Default: 1

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

Statuserror.codeWhy
400INVALID_REQUEST_BODYA field is wrong or unknown
400INVALID_DATA_APP_API_KEYYou used a service token
500INTERNAL_SERVER_ERRORThe list could not be read

For errors that every endpoint returns, see Authentication.

Example Request
curl -X GET 'https://api.usedatabrain.com/api/v2/data-app/dashboards'
Example Response
{  "data": [    {      "name": "Sales overview",      "externalDashboardId": "sales-overview",      "embedId": "sales-overview"    }  ]}