Embedding API
Fetch Metrics by Workspace
Retrieve metrics from a workspace with optional pagination support.
POST
Retrieve metrics available in a workspace. Use this endpoint to discover metrics for provisioning and embedding in your application.
This endpoint operates at the workspace level using a service token. Use the workspace name to scope which metrics are returned. Supports pagination for workspaces with many metrics.
Authentication
This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:- In Settings page, navigate to the Service Tokens section.
- Click the “Generate Token” button to create a new service token if you don’t have one already.
Headers
Bearer token for API authentication. Use your service token.
Must be set to
application/json for all requests.Request Body
Name of the workspace to fetch metrics from. Must match an existing workspace in your organization.
Enable pagination to retrieve metrics in batches of 10.
true: Enable pagination with page-based retrieval (10 items per page)false(default): Return all metrics in a single response
The page number to retrieve when pagination is enabled. Pages are 1-indexed.Note: This parameter is only used when
isPagination is set to true.Response
Array of metric objects. Returns empty array if no metrics exist or page number exceeds available pages.
Error object if the request failed, otherwise
null for successful requests.Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK - Metrics retrieved successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | Missing or invalid request body parameters |
WORKSPACE_ID_ERROR | 400 | Workspace name does not exist |
INVALID_DATA_APP_API_KEY | 401 | Invalid or expired API key |
INTERNAL_SERVER_ERROR | 500 | Server error |
Next Steps
Fetch Dashboards by Workspace
Retrieve dashboards from a workspace
List Workspaces
List all workspaces in your organization
Create Workspace
Create a new workspace for your analytics environment
Guest Token API
Generate secure tokens for embedded access

