Endpoint Migration Notice: We’re transitioning to kebab-case endpoints. The new endpoint is
/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.This endpoint embeds existing dashboards/metrics from your workspace. To create a new blank dashboard for multi-tenant scenarios, use the Create Dashboard Embed endpoint instead.
Endpoint Formats
- New Endpoint (Recommended)
- Legacy Endpoint (Deprecated Soon)
Authentication
All API requests must include your API key in the Authorization header. Get your API token when creating a data app - see our data app creation guide for details. Finding your API token: For detailed instructions, see the API Token guide.Headers
Bearer token for API authentication. Use your API key from the data app.
Must be set to
application/json
for all requests.Request Body
Existing dashboard ID to embed. This dashboard must already exist in your workspace.
Type of embed configuration:
dashboard
or metric
.Metric ID to embed. Required if embedType is
metric
.The name of the workspace where the embed configuration will be created.
Access control settings for the embedded view.
The datamart name used in the embedded environment.
Allow AI pilot features.
Allow sending email reports.
Allow managing metrics.
Allow creating dashboard views.
Allow metric creation.
Allow metric deletion.
Allow metric layout changes.
Allow updating metrics.
Allow viewing underlying data.
Mode of metric creation (drag and drop or chat).
Multi-tenant table access configuration (optional).
Table name for tenancy configuration.
Column name for client-level filtering.
Response
Unique identifier for the created embed configuration.
Error object if the request failed, otherwise
null
.HTTP Status Code Summary
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 |
Possible Errors
Error Code | HTTP Status | Description | Solution |
---|---|---|---|
INVALID_WORKSPACE_NAME | 404 | Workspace not found | Verify workspace exists and you have access |
INVALID_DATA_APP_API_KEY | 401 | Invalid API key | Check your API key and permissions |
INVALID_DASHBOARD_ID | 404 | Dashboard not found | Verify dashboard ID exists in workspace |
INVALID_METRIC_ID | 404 | Metric not found | Verify metric ID exists (required for metric embeds) |
INTERNAL_SERVER_ERROR | 500 | Server error | Contact support if error persists |
Quick Start Guide
1
Get your API token
For detailed instructions, see the API Token guide.
2
Create a dashboard in your workspace
First, create and configure your dashboard in the DataBrain workspace with all the metrics and visualizations you want to embed.
3
Create embed configuration for dashboard
Make a POST request to embed your existing dashboard:
4
(Optional) Embed a single metric
To embed just one metric instead of the entire dashboard, use
embedType: "metric"
:5
Generate a guest token
Use the embed ID to generate a guest token for your end users. See the Guest Token API for details.
6
Embed in your application
Use the embed ID and guest token in your web component: