Skip to main content
curl --request POST \
  --url 'https://api.usedatabrain.com/api/v2/data-app/export-dashboard' \
  --header 'Authorization: Bearer dbn_live_...' \
  --header 'Content-Type: application/json' \
  --data '{"dashboardId":"sales-dashboard-1","workspaceName":"Sales Workspace"}' \
  --output dashboard-sales-dashboard-1.json
{
  "_meta": {
    "exportedAt": "2025-02-13T10:00:00.000Z",
    "workspaceName": "Sales Workspace",
    "dashboardId": "sales-dashboard-1"
  },
  "data": {
    "layout": [...],
    "filters": [...],
    ...
  }
}
POST
https://api.usedatabrain.com
/
api
/
v2
/
data-app
/
export-dashboard
curl --request POST \
  --url 'https://api.usedatabrain.com/api/v2/data-app/export-dashboard' \
  --header 'Authorization: Bearer dbn_live_...' \
  --header 'Content-Type: application/json' \
  --data '{"dashboardId":"sales-dashboard-1","workspaceName":"Sales Workspace"}' \
  --output dashboard-sales-dashboard-1.json
{
  "_meta": {
    "exportedAt": "2025-02-13T10:00:00.000Z",
    "workspaceName": "Sales Workspace",
    "dashboardId": "sales-dashboard-1"
  },
  "data": {
    "layout": [...],
    "filters": [...],
    ...
  }
}
Export a dashboard and its configuration (layout, metrics, filters) from a workspace. The response is a JSON file download that can be used with the Import Dashboard API or the UI import flow.
Authentication Requirement: This endpoint requires a service token (company-level), not a data app API key. Service tokens have elevated permissions. Use the token that has access to the workspace and dashboard.

Authentication

Use your service token in the Authorization header. See API Token guide for how to obtain a service token.

Headers

Authorization
string
required
Bearer token for API authentication. Use your service token (company-level).
Authorization: Bearer dbn_live_...
Content-Type
string
required
Must be application/json when sending a JSON body.
Content-Type: application/json

Request Body

dashboardId
string
required
The dashboard ID to export. This is the external dashboard ID (e.g. from Fetch Dashboards by Data App or the dashboard list in the UI).
workspaceName
string
required
The name of the workspace that contains the dashboard. Must match the workspace name exactly.

Response

On success, the API returns 200 with:
  • Content-Type: application/json
  • Content-Disposition: attachment; filename="dashboard-{dashboardId}.json"
The response body is a JSON object with this structure:
_meta
object
Metadata about the export.
_meta.exportedAt
string
ISO 8601 timestamp when the export was performed.
_meta.workspaceName
string
The workspace name the dashboard was exported from.
_meta.dashboardId
string
The dashboard ID that was exported.
data
object
The dashboard configuration and content (layout, metrics, filters, etc.). Structure matches what the import API expects as importDashboardData.
On error, the API returns a JSON error object (e.g. 400 or 500) with error.code and error.message.

Examples

HTTP Status Code Summary

Status CodeDescription
200OK – Dashboard exported successfully; response is a JSON file (attachment)
400Bad Request – Invalid or missing parameters, invalid token, or dashboard/workspace not found
500Internal Server Error – Server error during export

Possible Errors

CodeMessageHTTP Status
INVALID_REQUEST_BODYJoi validation message (e.g. "dashboardId" is required)400
AUTH_ERRORInvalid Service Token400
DATA_APP_NOT_FOUNDData app not found400
INTERNAL_SERVER_ERRORServer error message500