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": {}
},
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"schemaPairs": [
{ "replaceSchema": "source_schema", "targetSchema": "public" }
]
}'
{
"data": {
"response": {
"message": "Imported Dashboard with 10 metrics",
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"workspaceName": "Target Workspace"
}
}
}
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": {}
},
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"schemaPairs": [
{ "replaceSchema": "source_schema", "targetSchema": "public" }
]
}'
{
"data": {
"response": {
"message": "Imported Dashboard with 10 metrics",
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"workspaceName": "Target Workspace"
}
}
}
Import a dashboard from a previously exported JSON payload into a workspace.
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": {}
},
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"schemaPairs": [
{ "replaceSchema": "source_schema", "targetSchema": "public" }
]
}'
{
"data": {
"response": {
"message": "Imported Dashboard with 10 metrics",
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"workspaceName": "Target Workspace"
}
}
}
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": {}
},
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"schemaPairs": [
{ "replaceSchema": "source_schema", "targetSchema": "public" }
]
}'
{
"data": {
"response": {
"message": "Imported Dashboard with 10 metrics",
"dashboardId": "sales-dashboard-1-copy",
"dashboardName": "Sales Dashboard (Copy)",
"workspaceName": "Target Workspace"
}
}
}
Authorization header. See Create Service Token for how to obtain a service token.
Authorization: Bearer dbn_live_...
application/json.Content-Type: application/json
importDashboardSchema: workspaceName (string, required) and importDashboardData (object, required) are required. dashboardId, dashboardName, and schemaPairs are optional. Each schemaPairs item must include replaceSchema and targetSchema (strings).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.Show Getting import data
data property of the exported JSON.data property from the downloaded JSON file.replaceSchema — string (required in each item)targetSchema — string (required in each item)"schemaPairs": [
{ "replaceSchema": "databrain_dev1", "targetSchema": "databrain_dev2" }
]
data.response contains:message – human-readable summary of the import (including the number of imported metrics)dashboardId – external dashboard ID in the target workspacedashboardName – name of the imported dashboard in the target workspaceworkspaceName – name of the workspace where the dashboard was importederror.code and error.message and HTTP status 400 or 500.
| Status Code | Description |
|---|---|
200 | OK – Dashboard imported successfully |
400 | Bad Request – Invalid or missing parameters, invalid token, or workspace not found |
500 | Internal Server Error – Server error during import |
| Code | Message | HTTP Status |
|---|---|---|
INVALID_REQUEST_BODY | Joi validation message (e.g. "workspaceName" is required, invalid schemaPairs item) | 400 |
AUTHENTICATION_ERROR | Invalid Service Token (e.g. missing/invalid company context on token) | 400 |
WORKSPACE_ID_ERROR | invalid workspace name, workspace name not found | 400 |
INTERNAL_SERVER_ERROR | Server error message | 500 |