curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1', {
method: 'GET',
headers: {
'Authorization': 'Bearer dbn_live_abc123...'
}
});
const data = await response.json();
console.log('Found embeds:', data.data.length);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app/embeds"
headers = {
"Authorization": "Bearer dbn_live_abc123..."
}
params = {
"isPagination": "true",
"pageNumber": "1"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found embeds: {len(data['data'])}")
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app/embeds')
params = { isPagination: 'true', pageNumber: '1' }
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer dbn_live_abc123...'
response = http.request(request)
data = JSON.parse(response.body)
puts "Found embeds: #{data['data'].length}"
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class DataBrainEmbedAPI {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String url = "https://api.usedatabrain.com/api/v2/data-app/embeds" +
"?isPagination=true&pageNumber=1";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer dbn_live_abc123...")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
type EmbedListResponse struct {
Data []interface{} `json:"data"`
Error interface{} `json:"error"`
}
func main() {
baseURL := "https://api.usedatabrain.com/api/v2/data-app/embeds"
params := url.Values{}
params.Add("isPagination", "true")
params.Add("pageNumber", "1")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, _ := http.NewRequest("GET", fullURL, nil)
req.Header.Set("Authorization", "Bearer dbn_live_abc123...")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var embedResp EmbedListResponse
json.NewDecoder(resp.Body).Decode(&embedResp)
fmt.Printf("Found embeds: %d\n", len(embedResp.Data))
}
<?php
$params = http_build_query([
'isPagination' => 'true',
'pageNumber' => '1'
]);
$url = 'https://api.usedatabrain.com/api/v2/data-app/embeds?' . $params;
$options = [
'http' => [
'header' => 'Authorization: Bearer dbn_live_abc123...',
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
echo "Found embeds: " . count($response['data']);
?>
{
"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
}
{
"error": {
"code": "INVALID_DATA_APP_API_KEY",
"message": "invalid or expired API KEY, data app not found"
}
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1', {
method: 'GET',
headers: {
'Authorization': 'Bearer dbn_live_abc123...'
}
});
const data = await response.json();
console.log('Found embeds:', data.data.length);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app/embeds"
headers = {
"Authorization": "Bearer dbn_live_abc123..."
}
params = {
"isPagination": "true",
"pageNumber": "1"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found embeds: {len(data['data'])}")
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app/embeds')
params = { isPagination: 'true', pageNumber: '1' }
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer dbn_live_abc123...'
response = http.request(request)
data = JSON.parse(response.body)
puts "Found embeds: #{data['data'].length}"
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class DataBrainEmbedAPI {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String url = "https://api.usedatabrain.com/api/v2/data-app/embeds" +
"?isPagination=true&pageNumber=1";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer dbn_live_abc123...")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
type EmbedListResponse struct {
Data []interface{} `json:"data"`
Error interface{} `json:"error"`
}
func main() {
baseURL := "https://api.usedatabrain.com/api/v2/data-app/embeds"
params := url.Values{}
params.Add("isPagination", "true")
params.Add("pageNumber", "1")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, _ := http.NewRequest("GET", fullURL, nil)
req.Header.Set("Authorization", "Bearer dbn_live_abc123...")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var embedResp EmbedListResponse
json.NewDecoder(resp.Body).Decode(&embedResp)
fmt.Printf("Found embeds: %d\n", len(embedResp.Data))
}
<?php
$params = http_build_query([
'isPagination' => 'true',
'pageNumber' => '1'
]);
$url = 'https://api.usedatabrain.com/api/v2/data-app/embeds?' . $params;
$options = [
'http' => [
'header' => 'Authorization: Bearer dbn_live_abc123...',
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
echo "Found embeds: " . count($response['data']);
?>
{
"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
}
{
"error": {
"code": "INVALID_DATA_APP_API_KEY",
"message": "invalid or expired API KEY, data app not found"
}
}
Embeds
List All Embeds
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...'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1', {
method: 'GET',
headers: {
'Authorization': 'Bearer dbn_live_abc123...'
}
});
const data = await response.json();
console.log('Found embeds:', data.data.length);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app/embeds"
headers = {
"Authorization": "Bearer dbn_live_abc123..."
}
params = {
"isPagination": "true",
"pageNumber": "1"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found embeds: {len(data['data'])}")
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app/embeds')
params = { isPagination: 'true', pageNumber: '1' }
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer dbn_live_abc123...'
response = http.request(request)
data = JSON.parse(response.body)
puts "Found embeds: #{data['data'].length}"
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class DataBrainEmbedAPI {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String url = "https://api.usedatabrain.com/api/v2/data-app/embeds" +
"?isPagination=true&pageNumber=1";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer dbn_live_abc123...")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
type EmbedListResponse struct {
Data []interface{} `json:"data"`
Error interface{} `json:"error"`
}
func main() {
baseURL := "https://api.usedatabrain.com/api/v2/data-app/embeds"
params := url.Values{}
params.Add("isPagination", "true")
params.Add("pageNumber", "1")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, _ := http.NewRequest("GET", fullURL, nil)
req.Header.Set("Authorization", "Bearer dbn_live_abc123...")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var embedResp EmbedListResponse
json.NewDecoder(resp.Body).Decode(&embedResp)
fmt.Printf("Found embeds: %d\n", len(embedResp.Data))
}
<?php
$params = http_build_query([
'isPagination' => 'true',
'pageNumber' => '1'
]);
$url = 'https://api.usedatabrain.com/api/v2/data-app/embeds?' . $params;
$options = [
'http' => [
'header' => 'Authorization: Bearer dbn_live_abc123...',
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
echo "Found embeds: " . count($response['data']);
?>
{
"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
}
{
"error": {
"code": "INVALID_DATA_APP_API_KEY",
"message": "invalid or expired API KEY, data app not found"
}
}
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...'
const response = await fetch('https://api.usedatabrain.com/api/v2/data-app/embeds?isPagination=true&pageNumber=1', {
method: 'GET',
headers: {
'Authorization': 'Bearer dbn_live_abc123...'
}
});
const data = await response.json();
console.log('Found embeds:', data.data.length);
import requests
url = "https://api.usedatabrain.com/api/v2/data-app/embeds"
headers = {
"Authorization": "Bearer dbn_live_abc123..."
}
params = {
"isPagination": "true",
"pageNumber": "1"
}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(f"Found embeds: {len(data['data'])}")
require 'net/http'
require 'json'
uri = URI('https://api.usedatabrain.com/api/v2/data-app/embeds')
params = { isPagination: 'true', pageNumber: '1' }
uri.query = URI.encode_www_form(params)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer dbn_live_abc123...'
response = http.request(request)
data = JSON.parse(response.body)
puts "Found embeds: #{data['data'].length}"
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
public class DataBrainEmbedAPI {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String url = "https://api.usedatabrain.com/api/v2/data-app/embeds" +
"?isPagination=true&pageNumber=1";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer dbn_live_abc123...")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println("Response: " + response.body());
}
}
package main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
)
type EmbedListResponse struct {
Data []interface{} `json:"data"`
Error interface{} `json:"error"`
}
func main() {
baseURL := "https://api.usedatabrain.com/api/v2/data-app/embeds"
params := url.Values{}
params.Add("isPagination", "true")
params.Add("pageNumber", "1")
fullURL := fmt.Sprintf("%s?%s", baseURL, params.Encode())
req, _ := http.NewRequest("GET", fullURL, nil)
req.Header.Set("Authorization", "Bearer dbn_live_abc123...")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var embedResp EmbedListResponse
json.NewDecoder(resp.Body).Decode(&embedResp)
fmt.Printf("Found embeds: %d\n", len(embedResp.Data))
}
<?php
$params = http_build_query([
'isPagination' => 'true',
'pageNumber' => '1'
]);
$url = 'https://api.usedatabrain.com/api/v2/data-app/embeds?' . $params;
$options = [
'http' => [
'header' => 'Authorization: Bearer dbn_live_abc123...',
'method' => 'GET'
]
];
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
echo "Found embeds: " . count($response['data']);
?>
{
"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
}
{
"error": {
"code": "INVALID_DATA_APP_API_KEY",
"message": "invalid or expired API KEY, data app not found"
}
}
Get a comprehensive list of all embed configurations created by your data app, including both dashboard and metric embeds with their associated metadata.
Use this endpoint for all new integrations. This is the recommended endpoint format.This endpoint still works but will be deprecated. Uses POST method with JSON body.
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
- New Endpoint (Recommended)
- Legacy Endpoint (Deprecated Soon)
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
}
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
string
required
Bearer token for API authentication. Use your API key from the data app.
Authorization: Bearer dbn_live_abc123...
Query Parameters
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".string
Page number to retrieve (1-based). Only used when isPagination is
"true". Must be a numeric string (e.g., "1", "2").string
Optional client ID to filter embeds. When provided, only returns dashboard embeds where the dashboard was created by the specified client.
Response
array
Array of embed objects with their configuration details.
string
Unique identifier for the embed configuration.
string
Type of embed: “dashboard” or “metric”.
string
The human-readable name of the embed configuration. This is the name set when creating or renaming the embed configuration.
object | null
object | null
object
Consolidated metadata object containing key embed information for easy access.
string
Unique identifier for the embed configuration.
string
The human-readable name of the embed configuration.
string
Type of embed: “dashboard” or “metric”.
string
Name of the data app associated with this embed.
string | null
Unique identifier for the metric (present when embedType is “metric”, null otherwise).
string | null
Unique identifier for the dashboard (present when embedType is “dashboard”, null otherwise).
string
ISO 8601 formatted timestamp indicating when the embed configuration was created.
string
ISO 8601 formatted timestamp indicating when the embed configuration was last updated.
null
Error field, null when successful. Not included in successful responses.
Examples
Error Codes
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_DATA_APP_API_KEY | 400 | Missing or invalid data app |
INTERNAL_SERVER_ERROR | 500 | Server error occurred |
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:Note: You can add query parameters for pagination or filtering if needed.
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds' \
--header 'Authorization: Bearer dbn_live_abc123...'
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(`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}`);
}
});
Next Steps
Embed a Pre-built Dashboard/Metric
Learn how to create new embed configurations
Update an Embed
Modify existing embed access settings
Delete an Embed
Remove embed configurations you no longer need
Query Metrics API
Query data from your embedded metrics
⌘I

