Skip to main content
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",
      "externalDashboard": {
        "metadata": {
          "createdAt": "2024-01-15T10:30:00Z",
          "updatedAt": "2024-01-20T14:45:00Z"
        },
        "name": "Sales Analytics Dashboard"
      },
      "externalMetric": null
    },
    {
      "embedId": "metric-456",
      "embedType": "metric",
      "externalDashboard": null,
      "externalMetric": {
        "name": "Monthly Revenue"
      }
    }
  ],
  "error": null
}
GET
/
api
/
v2
/
data-app
/
embeds
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",
      "externalDashboard": {
        "metadata": {
          "createdAt": "2024-01-15T10:30:00Z",
          "updatedAt": "2024-01-20T14:45:00Z"
        },
        "name": "Sales Analytics Dashboard"
      },
      "externalMetric": null
    },
    {
      "embedId": "metric-456",
      "embedType": "metric",
      "externalDashboard": null,
      "externalMetric": {
        "name": "Monthly Revenue"
      }
    }
  ],
  "error": null
}
Get a comprehensive list of all embed configurations created by your data app, including both dashboard and metric embeds with their associated metadata.
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 returns all embeds you have access to within the authenticated data app. The response includes embed IDs, types, and associated dashboard/metric information.

Endpoint Formats

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

Authorization
string
required
Bearer token for API authentication. Use your API key from the data app.
Authorization: Bearer dbn_live_abc123...

Query Parameters

isPagination
string
Whether to paginate results. Pass "true" to enable pagination with a limit of 10 per page.Note: Query parameters are passed as strings. Use "true" or "false".
pageNumber
string
Page number to retrieve (1-based). Only used when isPagination is "true". Must be a numeric string (e.g., "1", "2").
clientId
string
Optional client ID to filter embeds by specific client.

Response

data
array
Array of embed objects with their configuration details.
data.embedId
string
Unique identifier for the embed configuration.
data.embedType
string
Type of embed: “dashboard” or “metric”.
data.externalDashboard
object
Dashboard information (present when embedType is “dashboard”).
data.externalDashboard.metadata
object
Dashboard metadata information.
data.externalDashboard.name
string
Name of the dashboard.
data.externalMetric
object
Metric information (present when embedType is “metric”).
data.externalMetric.name
string
Name of the metric.
error
null
Error field, null when successful.

Examples

Error Codes

INVALID_DATA_APP_API_KEY
string
Missing or invalid data app - Check your API key and data app configuration
INTERNAL_SERVER_ERROR
string
Unexpected failure - Internal server error occurred

HTTP Status Code Summary

Status CodeDescription
200OK - Request successful
400Bad Request - Invalid request parameters or missing API key
401Unauthorized - Invalid or expired API token
500Internal Server Error - Unexpected server error

Possible Errors

CodeMessageHTTP Status
INVALID_DATA_APP_API_KEYMissing or invalid data app400
INTERNAL_SERVER_ERRORUnexpected failure500

Quick Start Guide

1

Get your API token

For detailed instructions, see the API Token guide.
2

List all embed configurations

Get all your embed configurations:
curl --request GET \
  --url 'https://api.usedatabrain.com/api/v2/data-app/embeds' \
  --header 'Authorization: Bearer dbn_live_abc123...'
Note: You can add query parameters for pagination or filtering if needed.
3

Use pagination for many embeds

If you have many embed configurations, use pagination with query parameters:
curl --request GET \
  --url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
  --header 'Authorization: Bearer dbn_live_abc123...'
4

Manage your embeds

Use the embed information to manage your configurations:
const embeds = await listEmbeds();
embeds.data.forEach(embed => {
  console.log(`Embed ID: ${embed.embedId}`);
  console.log(`Type: ${embed.embedType}`);
  
  if (embed.embedType === 'dashboard') {
    console.log(`Dashboard: ${embed.externalDashboard.name}`);
  } else if (embed.embedType === 'metric') {
    console.log(`Metric: ${embed.externalMetric.name}`);
  }
});

Next Steps

I