Skip to main content
POST
/
api
/
v2
/
workspace
/
metrics
Fetch Metrics by Workspace (Legacy)
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/workspace/metrics \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "workspaceName": "<string>",
  "isPagination": true,
  "pageNumber": 123
}'
{
  "data": [
    {
      "name": "string",
      "metricId": "string"
    }
  ],
  "error": null
}
Legacy Endpoint - Deprecated: This endpoint is deprecated and will be removed in a future release. Please use the Fetch Metrics by Embed and Client endpoint instead, which provides enhanced functionality via the /api/v2/data-app/metrics path.
Retrieve metrics from a workspace. This is a legacy endpoint maintained for backward compatibility.

Headers

Authorization
string
required
Bearer API TOKEN

Request Body

workspaceName
string
required
isPagination
boolean
pageNumber
number
{
  "data": [
    {
      "name": "string",
      "metricId": "string"
    }
  ],
  "error": null
}

Migration Guide

Recommended Migration: Switch to the Fetch Metrics by Embed and Client endpoint for better data app integration.

Migration Example:

Before (Legacy):
POST /api/v2/workspace/metrics
{
  "workspaceName": "my-workspace",
  "isPagination": true,
  "pageNumber": 1
}
After (Recommended):
GET /api/v2/data-app/metrics?embedId=embed_123&clientId=client_xyz&isPagination=true&pageNumber=1
Authorization: Bearer dbn_live_abc123...
See the Fetch Metrics by Embed and Client documentation for complete migration details.
I