curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"embedId": "dashboard-123",
"embedType": "dashboard",
"name": "Sales Dashboard Embed",
"externalDashboard": {
"externalDashboardId": "dashboard-uuid-456",
"metadata": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
},
"name": "Sales Analytics Dashboard"
},
"externalMetric": null,
"embedMetadata": {
"embedId": "dashboard-123",
"name": "Sales Dashboard Embed",
"embedType": "dashboard",
"dataAppName": "Production Data App",
"metricId": null,
"dashboardId": "dashboard-uuid-456",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
},
{
"embedId": "metric-456",
"embedType": "metric",
"name": "Revenue Metric Embed",
"externalDashboard": null,
"externalMetric": {
"metricId": "metric-uuid-789",
"name": "Monthly Revenue"
},
"embedMetadata": {
"embedId": "metric-456",
"name": "Revenue Metric Embed",
"embedType": "metric",
"dataAppName": "Production Data App",
"metricId": "metric-uuid-789",
"dashboardId": null,
"createdAt": "2024-01-16T08:15:00Z",
"updatedAt": "2024-01-18T12:30:00Z"
}
}
],
"error": null
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"embedId": "dashboard-123",
"embedType": "dashboard",
"name": "Sales Dashboard Embed",
"externalDashboard": {
"externalDashboardId": "dashboard-uuid-456",
"metadata": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
},
"name": "Sales Analytics Dashboard"
},
"externalMetric": null,
"embedMetadata": {
"embedId": "dashboard-123",
"name": "Sales Dashboard Embed",
"embedType": "dashboard",
"dataAppName": "Production Data App",
"metricId": null,
"dashboardId": "dashboard-uuid-456",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
},
{
"embedId": "metric-456",
"embedType": "metric",
"name": "Revenue Metric Embed",
"externalDashboard": null,
"externalMetric": {
"metricId": "metric-uuid-789",
"name": "Monthly Revenue"
},
"embedMetadata": {
"embedId": "metric-456",
"name": "Revenue Metric Embed",
"embedType": "metric",
"dataAppName": "Production Data App",
"metricId": "metric-uuid-789",
"dashboardId": null,
"createdAt": "2024-01-16T08:15:00Z",
"updatedAt": "2024-01-18T12:30:00Z"
}
}
],
"error": null
}
Fetch a list of all embeds created by the authenticated data app.
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"embedId": "dashboard-123",
"embedType": "dashboard",
"name": "Sales Dashboard Embed",
"externalDashboard": {
"externalDashboardId": "dashboard-uuid-456",
"metadata": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
},
"name": "Sales Analytics Dashboard"
},
"externalMetric": null,
"embedMetadata": {
"embedId": "dashboard-123",
"name": "Sales Dashboard Embed",
"embedType": "dashboard",
"dataAppName": "Production Data App",
"metricId": null,
"dashboardId": "dashboard-uuid-456",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
},
{
"embedId": "metric-456",
"embedType": "metric",
"name": "Revenue Metric Embed",
"externalDashboard": null,
"externalMetric": {
"metricId": "metric-uuid-789",
"name": "Monthly Revenue"
},
"embedMetadata": {
"embedId": "metric-456",
"name": "Revenue Metric Embed",
"embedType": "metric",
"dataAppName": "Production Data App",
"metricId": "metric-uuid-789",
"dashboardId": null,
"createdAt": "2024-01-16T08:15:00Z",
"updatedAt": "2024-01-18T12:30:00Z"
}
}
],
"error": null
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"embedId": "dashboard-123",
"embedType": "dashboard",
"name": "Sales Dashboard Embed",
"externalDashboard": {
"externalDashboardId": "dashboard-uuid-456",
"metadata": {
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
},
"name": "Sales Analytics Dashboard"
},
"externalMetric": null,
"embedMetadata": {
"embedId": "dashboard-123",
"name": "Sales Dashboard Embed",
"embedType": "dashboard",
"dataAppName": "Production Data App",
"metricId": null,
"dashboardId": "dashboard-uuid-456",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:45:00Z"
}
},
{
"embedId": "metric-456",
"embedType": "metric",
"name": "Revenue Metric Embed",
"externalDashboard": null,
"externalMetric": {
"metricId": "metric-uuid-789",
"name": "Monthly Revenue"
},
"embedMetadata": {
"embedId": "metric-456",
"name": "Revenue Metric Embed",
"embedType": "metric",
"dataAppName": "Production Data App",
"metricId": "metric-uuid-789",
"dashboardId": null,
"createdAt": "2024-01-16T08:15:00Z",
"updatedAt": "2024-01-18T12:30:00Z"
}
}
],
"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.GET https://api.usedatabrain.com/api/v2/data-app/embeds
POST https://api.usedatabrain.com/api/v2/dataApp/embed/list
Content-Type: application/json
{
"isPagination": true,
"pageNumber": 1
}
Authorization: Bearer dbn_live_abc123...
"true" to enable pagination with a limit of 10 per page.Note: Query parameters are passed as strings. Use "true" or "false"."true". Must be a numeric string (e.g., "1", "2").| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_DATA_APP_API_KEY | 400 | Missing or invalid data app |
INTERNAL_SERVER_ERROR | 500 | Server error occurred |
Get your API token
List all embed configurations
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds' \
--header 'Authorization: Bearer dbn_live_abc123...'
Use pagination for many embeds
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
Manage your embeds
const embeds = await listEmbeds();
embeds.data.forEach(embed => {
console.log(`Embed ID: ${embed.embedId}`);
console.log(`Embed Name: ${embed.name}`);
console.log(`Type: ${embed.embedType}`);
// Access timestamps and IDs from embedMetadata
console.log(`Created: ${embed.embedMetadata.createdAt}`);
console.log(`Updated: ${embed.embedMetadata.updatedAt}`);
console.log(`Data App: ${embed.embedMetadata.dataAppName}`);
if (embed.embedType === 'dashboard' && embed.externalDashboard) {
console.log(`Dashboard ID: ${embed.externalDashboard.externalDashboardId}`);
console.log(`Dashboard: ${embed.externalDashboard.name}`);
console.log(`Dashboard ID (from metadata): ${embed.embedMetadata.dashboardId}`);
} else if (embed.embedType === 'metric' && embed.externalMetric) {
console.log(`Metric ID: ${embed.externalMetric.metricId}`);
console.log(`Metric: ${embed.externalMetric.name}`);
console.log(`Metric ID (from metadata): ${embed.embedMetadata.metricId}`);
}
});