This endpoint returns metrics filtered by client access. Client-created metrics are only visible to the specific client that created them, while shared metrics are visible to all clients.
Authentication
All API requests must include your API key in the Authorization header. Get your API token when creating a data app - see our data app creation guide for details. Finding your API token: For detailed instructions, see the API Token guide.Headers
Bearer token for API authentication. Use your API key from the data app.
Query Parameters
The embed configuration ID to fetch metrics for. This identifies which embedded dashboard’s metrics you want to retrieve.
The client identifier for filtering metrics. Determines which metrics the client has access to based on their permissions and ownership.
Enable pagination to limit the number of results returned. Pass
"true"
to enable pagination with a limit of 10 per page.Note: Query parameters are passed as strings. Use "true"
or "false"
.Page number for pagination (1-based). Only used when isPagination is
"true"
. Must be a numeric string (e.g., "1"
, "2"
).Filter to return only metrics when set to
"true"
. Pass "false"
or omit to return all items including non-metric components.Note: Query parameters are passed as strings. Use "true"
or "false"
.Response
Error object if the request failed, otherwise
null
for successful requests.Examples
Error Codes
Invalid or missing Data App API Key - Check your API key and ensure it’s valid for your data app
Invalid request parameters - Verify that required fields
embedId
and clientId
are provided with correct typesEmbed ID not found or mismatched with API Key - The embed ID doesn’t exist or doesn’t belong to your data app
HTTP Status Code Summary
Status Code | Description |
---|---|
200 | OK - Metrics retrieved successfully |
400 | Bad Request - Invalid request parameters or missing required fields |
401 | Unauthorized - Invalid or missing API key |
404 | Not Found - Embed ID not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error occurred |
Possible Errors
Error Code | HTTP Status | Description | Solution |
---|---|---|---|
INVALID_DATA_APP_API_KEY | 401 | Invalid API key | Check your API key and permissions |
EMBED_PARAM_ERROR | 404 | Embed ID not found | Verify embed ID exists and belongs to your data app |
INVALID_REQUEST_BODY | 400 | Missing required fields | Provide both embedId and clientId |
RATE_LIMIT_EXCEEDED | 429 | Too many requests | Implement exponential backoff |
INTERNAL_SERVER_ERROR | 500 | Server error | Contact support if error persists |
Client Access Control
Metric Visibility Rules
- Shared Metrics: Available to all clients within the embed
- Client-Created Metrics: Only visible to the client that created them
- Access Settings: Controlled by the embed configuration’s access settings
Understanding Client-Specific Results
The API automatically filters metrics based on the client’s access permissions:Pagination Guide
When working with large metric collections:- Enable pagination by setting query parameter
isPagination=true
- Start with page 1 using
pageNumber=1
- Filter only metrics by setting
isMetric=true
(optional) - Each page returns up to 10 metrics
- Continue to next page if you receive exactly 10 results
- Stop pagination when you receive fewer than 10 results
Integration Workflow
Step 1: Get Available Metrics
Step 2: Use Metrics for Queries
Quick Start Guide
1
Get your embed ID
First, you need an embed ID. Get it from your embed configurations:
2
Fetch metrics for a client
Get the metrics available for a specific client and embed:
3
Use pagination for many metrics
If there are many metrics, use pagination with query parameters. Add
isMetric=true
to filter only metrics:4
Use metric IDs for queries
Use the returned metric IDs to query actual data: