curl --request POST \
--url https://api.usedatabrain.com/api/v2/data-app/embeds \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"dashboardId": "dash_12345",
"embedType": "dashboard",
"workspaceName": "analytics-workspace",
"name": "Sales Dashboard Embed",
"accessSettings": {
"datamartName": "sales-data",
"isAllowEmailReports": false,
"isAllowManageMetrics": true,
"isAllowCreateDashboardView": true,
"isAllowMetricCreation": true,
"isAllowMetricDeletion": false,
"isAllowMetricLayoutChange": true,
"isAllowMetricUpdate": true,
"isAllowUnderlyingData": false,
"joinModel": "multi",
"metricCreationMode": "DRAG_DROP",
"tableTenancySettings": [
{
"name": "sales_data",
"clientColumn": "customer_id"
}
]
}
}'
{
"id": "embed_abc123def456",
"error": null
}
curl --request POST \
--url https://api.usedatabrain.com/api/v2/data-app/embeds \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"dashboardId": "dash_12345",
"embedType": "dashboard",
"workspaceName": "analytics-workspace",
"name": "Sales Dashboard Embed",
"accessSettings": {
"datamartName": "sales-data",
"isAllowEmailReports": false,
"isAllowManageMetrics": true,
"isAllowCreateDashboardView": true,
"isAllowMetricCreation": true,
"isAllowMetricDeletion": false,
"isAllowMetricLayoutChange": true,
"isAllowMetricUpdate": true,
"isAllowUnderlyingData": false,
"joinModel": "multi",
"metricCreationMode": "DRAG_DROP",
"tableTenancySettings": [
{
"name": "sales_data",
"clientColumn": "customer_id"
}
]
}
}'
{
"id": "embed_abc123def456",
"error": null
}
Create an embed for an existing dashboard or metric that was built by your data analyst.
curl --request POST \
--url https://api.usedatabrain.com/api/v2/data-app/embeds \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"dashboardId": "dash_12345",
"embedType": "dashboard",
"workspaceName": "analytics-workspace",
"name": "Sales Dashboard Embed",
"accessSettings": {
"datamartName": "sales-data",
"isAllowEmailReports": false,
"isAllowManageMetrics": true,
"isAllowCreateDashboardView": true,
"isAllowMetricCreation": true,
"isAllowMetricDeletion": false,
"isAllowMetricLayoutChange": true,
"isAllowMetricUpdate": true,
"isAllowUnderlyingData": false,
"joinModel": "multi",
"metricCreationMode": "DRAG_DROP",
"tableTenancySettings": [
{
"name": "sales_data",
"clientColumn": "customer_id"
}
]
}
}'
{
"id": "embed_abc123def456",
"error": null
}
curl --request POST \
--url https://api.usedatabrain.com/api/v2/data-app/embeds \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"dashboardId": "dash_12345",
"embedType": "dashboard",
"workspaceName": "analytics-workspace",
"name": "Sales Dashboard Embed",
"accessSettings": {
"datamartName": "sales-data",
"isAllowEmailReports": false,
"isAllowManageMetrics": true,
"isAllowCreateDashboardView": true,
"isAllowMetricCreation": true,
"isAllowMetricDeletion": false,
"isAllowMetricLayoutChange": true,
"isAllowMetricUpdate": true,
"isAllowUnderlyingData": false,
"joinModel": "multi",
"metricCreationMode": "DRAG_DROP",
"tableTenancySettings": [
{
"name": "sales_data",
"clientColumn": "customer_id"
}
]
}
}'
{
"id": "embed_abc123def456",
"error": null
}
/api/v2/data-app/embeds. The old endpoint /api/v2/dataApp/embeds will be deprecated soon. Please update your integrations to use the new endpoint format.POST https://api.usedatabrain.com/api/v2/data-app/embeds
POST https://api.usedatabrain.com/api/v2/dataApp/embeds
Authorization: Bearer dbn_live_abc123...
application/json for all requests.Content-Type: application/json
dashboard or metric.metric.embedType is dashboard. Optional when embedType is metric.embedType is dashboard.single: single worksheet mode (tables are pre-joined into one worksheet)multi: multi-sheet mode (joins are resolved dynamically based on fields used in each chart)accessSettings.joinModel instead.null.| Status Code | Description |
|---|---|
200 | OK - Embed configuration created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
404 | Not Found - Dashboard or metric not found |
500 | Internal Server Error - Server error occurred |
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_WORKSPACE_NAME | 404 | Workspace not found |
INVALID_DATA_APP_API_KEY | 401 | Invalid API key |
INVALID_DASHBOARD_ID | 404 | Dashboard not found |
INVALID_METRIC_ID | 404 | Metric not found |
INTERNAL_SERVER_ERROR | 500 | Server error |
Get your API token
Create a dashboard in your workspace
Create embed configuration for dashboard
curl --request POST \
--url https://api.usedatabrain.com/api/v2/data-app/embeds \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"dashboardId": "existing-dashboard-id",
"embedType": "dashboard",
"workspaceName": "my-workspace",
"accessSettings": {
"datamartName": "my-datamart",
"isAllowEmailReports": false,
"isAllowManageMetrics": true,
"isAllowCreateDashboardView": true,
"isAllowMetricCreation": true,
"isAllowMetricDeletion": false,
"isAllowMetricLayoutChange": true,
"isAllowMetricUpdate": true,
"isAllowUnderlyingData": false,
"joinModel": "multi",
"metricCreationMode": "DRAG_DROP"
}
}'
(Optional) Embed a single metric
embedType: "metric":{
"dashboardId": "existing-dashboard-id",
"embedType": "metric",
"metricId": "metric-123",
"workspaceName": "my-workspace",
// ... accessSettings
}
Generate a guest token