Skip to main content
curl --request POST \
  --url 'https://api.usedatabrain.com/api/v2/data-app/import-dashboard' \
  --header 'Authorization: Bearer dbn_live_...' \
  --header 'Content-Type: application/json' \
  --data '{
    "workspaceName": "Target Workspace",
    "importDashboardData": {
      "layout": [],
      "filters": [],
      "gridMargin": {}
    }
  }'
{
  "data": []
}
POST
https://api.usedatabrain.com
/
api
/
v2
/
data-app
/
import-dashboard
curl --request POST \
  --url 'https://api.usedatabrain.com/api/v2/data-app/import-dashboard' \
  --header 'Authorization: Bearer dbn_live_...' \
  --header 'Content-Type: application/json' \
  --data '{
    "workspaceName": "Target Workspace",
    "importDashboardData": {
      "layout": [],
      "filters": [],
      "gridMargin": {}
    }
  }'
{
  "data": []
}
Import a dashboard into a workspace using JSON data from the Export Dashboard API or from a file exported via the Databrain UI. The dashboard layout, metrics, and filters are recreated in the target workspace.
Authentication Requirement: This endpoint requires a service token (company-level), not a data app API key. The workspace must belong to your company.

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.
Content-Type: application/json

Request Body

workspaceName
string
required
The name of the workspace where the dashboard should be imported. Must match an existing workspace name in your company.
importDashboardData
object
required
The dashboard payload to import. Must be a non-null object. Use the data property from an Export Dashboard response, or the equivalent structure from a UI-exported JSON file. Contains layout, filters, metrics configuration, and related dashboard structure.

Response

data
array
Result of the import operation. On success, an array of created/imported dashboard information. May be an empty array. Structure depends on the import implementation.
On error, the API returns a JSON object with error.code and error.message and HTTP status 400 or 500.

Examples

HTTP Status Code Summary

Status CodeDescription
200OK – Dashboard imported successfully
400Bad Request – Invalid or missing parameters, invalid token, or workspace not found
500Internal Server Error – Server error during import

Possible Errors

CodeMessageHTTP Status
INVALID_REQUEST_BODYJoi validation message (e.g. "workspaceName" is required, "importDashboardData" is required)400
AUTH_ERRORInvalid Service Token400
WORKSPACE_ID_ERRORinvalid workspace name, workspace name not found400
INTERNAL_SERVER_ERRORServer error message500