curl --request POST \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=embed_abc123def456' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json'
{
"id": "embed_abc123def456",
"error": null
}
curl --request POST \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=embed_abc123def456' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json'
{
"id": "embed_abc123def456",
"error": null
}
Delete an embed from your data app. This action cannot be undone.
curl --request POST \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=embed_abc123def456' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json'
{
"id": "embed_abc123def456",
"error": null
}
curl --request POST \
--url 'https://api.usedatabrain.com/api/v2/data-app/embeds?embedId=embed_abc123def456' \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json'
{
"id": "embed_abc123def456",
"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.DELETE https://api.usedatabrain.com/api/v2/data-app/embeds?embedId={id}
POST https://api.usedatabrain.com/api/v2/data-app/embeds?embedId={id}
Content-Type: application/json
{
"embedId": "embed_abc123def456"
}
Authorization: Bearer dbn_live_abc123...
Show Finding embed IDs
"true" to enable dashboard deletion."true", this will permanently delete the dashboard associated with this embed. This action cannot be undone.Show Dashboard deletion behavior
isDeleteDashboard=true - Delete both embed and dashboardisDeleteDashboard=false or omitted - Delete only embed configuration| Status Code | Description |
|---|---|
| 200 | OK - Embed deleted successfully |
| 400 | Bad Request - Invalid request parameters or embed not found |
| 500 | Internal Server Error - Unexpected server error |
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 500 | Embed not found |
INVALID_REQUEST_BODY | 500 | Internal dashboards can’t be removed |
INVALID_REQUEST_BODY | 500 | Dashboard is referenced by multiple embeds |
INVALID_DATA_APP_API_KEY | 400 | invalid or expired API KEY, data app not found |
// Delete an embed configuration
const result = await deleteEmbed({
embedId: 'embed_123'
});
console.log(`Deleted embed: ${result.id}`);
// Delete multiple embed configurations
const embedIds = ['embed_1', 'embed_2', 'embed_3'];
for (const embedId of embedIds) {
try {
const result = await deleteEmbed({ embedId });
console.log(`Deleted embed: ${result.id}`);
} catch (error) {
console.error(`Failed to delete ${embedId}:`, error.message);
}
}
// Verify embed exists before deletion
const embeds = await listEmbeds();
const embedToDelete = embeds.data.find(e => e.embedId === 'embed_123');
if (embedToDelete) {
const result = await deleteEmbed({
embedId: embedToDelete.embedId
});
console.log(`Successfully deleted: ${result.id}`);
} else {
console.log('Embed not found');
}