curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=embed_abc123&clientId=client_xyz789&isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"id": "report-1",
"subject": "Daily Sales Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_revenue_123"
}
},
{
"externalMetric": {
"metricId": "metric_orders_456"
}
}
],
"timeConfigurations": {
"frequency": "daily",
"time": "09:00",
"timezone": "UTC"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:22:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": "user_abc123"
},
{
"id": "report-2",
"subject": "Weekly Summary Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_users_789"
}
}
],
"timeConfigurations": {
"frequency": "weekly",
"day": "monday",
"time": "08:00",
"timezone": "UTC"
},
"createdAt": "2024-01-10T08:15:00Z",
"updatedAt": "2024-01-10T08:15:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": null
}
]
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=embed_abc123&clientId=client_xyz789&isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"id": "report-1",
"subject": "Daily Sales Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_revenue_123"
}
},
{
"externalMetric": {
"metricId": "metric_orders_456"
}
}
],
"timeConfigurations": {
"frequency": "daily",
"time": "09:00",
"timezone": "UTC"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:22:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": "user_abc123"
},
{
"id": "report-2",
"subject": "Weekly Summary Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_users_789"
}
}
],
"timeConfigurations": {
"frequency": "weekly",
"day": "monday",
"time": "08:00",
"timezone": "UTC"
},
"createdAt": "2024-01-10T08:15:00Z",
"updatedAt": "2024-01-10T08:15:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": null
}
]
}
Retrieve scheduled email reports for a specific embed configuration, with support for pagination and filtering by client or user identifier.
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=embed_abc123&clientId=client_xyz789&isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"id": "report-1",
"subject": "Daily Sales Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_revenue_123"
}
},
{
"externalMetric": {
"metricId": "metric_orders_456"
}
}
],
"timeConfigurations": {
"frequency": "daily",
"time": "09:00",
"timezone": "UTC"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:22:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": "user_abc123"
},
{
"id": "report-2",
"subject": "Weekly Summary Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_users_789"
}
}
],
"timeConfigurations": {
"frequency": "weekly",
"day": "monday",
"time": "08:00",
"timezone": "UTC"
},
"createdAt": "2024-01-10T08:15:00Z",
"updatedAt": "2024-01-10T08:15:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": null
}
]
}
curl --request GET \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=embed_abc123&clientId=client_xyz789&isPagination=true&pageNumber=1' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": [
{
"id": "report-1",
"subject": "Daily Sales Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_revenue_123"
}
},
{
"externalMetric": {
"metricId": "metric_orders_456"
}
}
],
"timeConfigurations": {
"frequency": "daily",
"time": "09:00",
"timezone": "UTC"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-20T14:22:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": "user_abc123"
},
{
"id": "report-2",
"subject": "Weekly Summary Report",
"scheduleEmailReportCharts": [
{
"externalMetric": {
"metricId": "metric_users_789"
}
}
],
"timeConfigurations": {
"frequency": "weekly",
"day": "monday",
"time": "08:00",
"timezone": "UTC"
},
"createdAt": "2024-01-10T08:15:00Z",
"updatedAt": "2024-01-10T08:15:00Z",
"clientId": "client_xyz789",
"embedId": "embed_abc123",
"createdByIdentifier": null
}
]
}
Authorization: Bearer dbn_live_abc123...
Show Finding embed IDs
Show Client filtering behavior
clientId is provided: Returns only reports configured for that specific client"true" to enable pagination with a limit of 10 reports per page.Note: Query parameters are passed as strings. Use "true" or "false"."true". Must be a numeric string (e.g., "1", "2").Default: If pagination is enabled and pageNumber is not provided, defaults to page 1.Show User filtering behavior
userIdentifier is provided: Returns only reports where createdByIdentifier matchesShow Time configuration structure
null if not specified.null: Indicates a system-created or admin-created scheduled report| Status Code | Description |
|---|---|
200 | OK - Scheduled reports retrieved successfully |
400 | Bad Request - Invalid request parameters, missing required fields, invalid API key, or embed ID not found |
500 | Internal Server Error - Server error occurred while processing the request |
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_DATA_APP_API_KEY | 400 | Invalid or expired API key, or data app not found |
INVALID_EMBED_ID | 400 | Embed ID not found for the given data app |
INVALID_REQUEST_BODY | 400 | Missing or invalid required parameters (e.g., embedId is required) |
INTERNAL_SERVER_ERROR | 500 | An unexpected error occurred on the server |
clientId is provided, the API returns only scheduled reports associated with that specific client:
// Get reports for a specific client
const clientReports = await fetch(`/api/v2/data-app/embeds/reports?embedId=embed_123&clientId=client_A`);
// Get all reports for the embed (across all clients)
const allReports = await fetch(`/api/v2/data-app/embeds/reports?embedId=embed_123`);
userIdentifier is provided, the API returns only scheduled reports created by that user:
// Get reports created by a specific user
const userReports = await fetch(`/api/v2/data-app/embeds/reports?embedId=embed_123&userIdentifier=user_abc`);
// Get all reports (regardless of creator)
const allReports = await fetch(`/api/v2/data-app/embeds/reports?embedId=embed_123`);
clientId and userIdentifier to filter reports by both client and creator:
// Get reports for a specific client created by a specific user
const filteredReports = await fetch(
`/api/v2/data-app/embeds/reports?embedId=embed_123&clientId=client_A&userIdentifier=user_abc`
);
// Get first page (reports 1-10)
const page1 = await fetch(`/api/v2/data-app/embeds/reports?embedId=embed_123&isPagination=true&pageNumber=1`);
// Get second page (reports 11-20)
const page2 = await fetch(`/api/v2/data-app/embeds/reports?embedId=embed_123&isPagination=true&pageNumber=2`);
async function loadScheduledReports(embedId) {
const response = await fetch(
`https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=${embedId}`,
{
headers: {
'Authorization': `Bearer ${apiToken}`
}
}
);
const { data } = await response.json();
return data; // Display in UI
}
async function getClientReports(embedId, clientId) {
const response = await fetch(
`https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=${embedId}&clientId=${clientId}`,
{
headers: {
'Authorization': `Bearer ${apiToken}`
}
}
);
const { data } = await response.json();
return data;
}
async function getUserReports(embedId, userIdentifier) {
const response = await fetch(
`https://api.usedatabrain.com/api/v2/data-app/embeds/reports?embedId=${embedId}&userIdentifier=${userIdentifier}`,
{
headers: {
'Authorization': `Bearer ${apiToken}`
}
}
);
const { data } = await response.json();
return data;
}