curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app/metrics/publish \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"embedId": "embed_abc123",
"metricId": "metric_xyz789",
"isPublished": true
}'
{
"id": "metric_xyz789"
}
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app/metrics/publish \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"embedId": "embed_abc123",
"metricId": "metric_xyz789",
"isPublished": true
}'
{
"id": "metric_xyz789"
}
Publish or unpublish metrics in an embed configuration to control which metrics are visible to end users.
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app/metrics/publish \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"embedId": "embed_abc123",
"metricId": "metric_xyz789",
"isPublished": true
}'
{
"id": "metric_xyz789"
}
curl --request PUT \
--url https://api.usedatabrain.com/api/v2/data-app/metrics/publish \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"embedId": "embed_abc123",
"metricId": "metric_xyz789",
"isPublished": true
}'
{
"id": "metric_xyz789"
}
Control the visibility of metrics within an embed by publishing or unpublishing them. Published metrics are visible to end users, while unpublished metrics remain hidden but can be published later.Documentation Index
Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer dbn_live_abc123...
application/json for all requests.Content-Type: application/json
Show Finding embed IDs
Show Finding metric IDs
true: Publish the metric (make it visible to end users)false: Unpublish the metric (hide it from end users)Show Publication behavior
| Status Code | Description |
|---|---|
200 | OK - Metric publication status updated |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Server error or invalid IDs |
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | Missing or invalid parameters |
INVALID_DATA_APP_API_KEY | 401 | Invalid API key |
INVALID_METRIC_ID | 500 | Invalid metric or embed ID |
INTERNAL_SERVER_ERROR | 500 | Server error |