Skip to main content
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/workspace/dashboards \
  --header 'Authorization: Bearer dbn_live_abc123...' \
  --header 'Content-Type: application/json' \
  --data '{
    "workspaceName": "my-workspace"
  }'
{
  "data": [
    {
      "name": "Sales Dashboard",
      "externalDashboardId": "sales_dash_123"
    },
    {
      "name": "Marketing Analytics",
      "externalDashboardId": "marketing_dash_456"
    }
  ],
  "error": null
}
POST
/
api
/
v2
/
workspace
/
dashboards
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/workspace/dashboards \
  --header 'Authorization: Bearer dbn_live_abc123...' \
  --header 'Content-Type: application/json' \
  --data '{
    "workspaceName": "my-workspace"
  }'
{
  "data": [
    {
      "name": "Sales Dashboard",
      "externalDashboardId": "sales_dash_123"
    },
    {
      "name": "Marketing Analytics",
      "externalDashboardId": "marketing_dash_456"
    }
  ],
  "error": null
}
Retrieve a list of dashboards available in a workspace. Use this endpoint to discover dashboards for provisioning and embedding in your application.
This endpoint operates at the workspace level using a service token. Use the workspace name to scope which dashboards are returned. Supports pagination for workspaces with many dashboards.

Authentication

This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:
  1. Go to your Databrain dashboard and open Settings.
  2. Navigate to Settings.
  3. Find the Service Tokens section.
  4. Click the “Generate Token” button to generate a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.

Headers

Authorization
string
required
Bearer token for API authentication. Use your service token.
Authorization: Bearer dbn_live_abc123...
Content-Type
string
required
Must be set to application/json for all requests.
Content-Type: application/json

Request Body

workspaceName
string
required
Name of the workspace to fetch dashboards from. Must match an existing workspace in your organization.
isPagination
boolean
Enable pagination to retrieve dashboards in batches of 10.
  • true: Enable pagination with page-based retrieval (10 items per page)
  • false (default): Return all dashboards in a single response
pageNumber
number
The page number to retrieve when pagination is enabled. Pages are 1-indexed.Note: This parameter is only used when isPagination is set to true.

Response

data
array
Array of dashboard objects. Returns empty array if no dashboards exist or page number exceeds available pages.
error
null | object
Error object if the request failed, otherwise null for successful requests.

Examples

HTTP Status Code Summary

Status CodeDescription
200OK - Dashboards retrieved successfully
400Bad Request - Invalid request parameters
401Unauthorized - Invalid or missing API key
500Internal Server Error - Server error occurred

Possible Errors

Error CodeHTTP StatusDescription
INVALID_REQUEST_BODY400Missing or invalid request body parameters
WORKSPACE_ID_ERROR400Workspace name does not exist
INVALID_DATA_APP_API_KEY401Invalid or expired API key
INTERNAL_SERVER_ERROR500Server error

Next Steps

Fetch Metrics by Workspace

Retrieve metrics from a workspace

List Workspaces

List all workspaces in your organization

Create Workspace

Create a new workspace for your analytics environment

Guest Token API

Generate secure tokens for embedded access