Viewing workspace usage metrics in Management API
On this page
This guide explains how to retrieve finalized row-usage metrics for billing and cost-allocation purposes using the Management API.
See GET /api/v1/usage/ in the API reference.
Prerequisites
Before you complete the procedures in this guide, perform all of the following actions:
-
Use a Connect API key with Usage: Read-only (
usage:read). Without this permission, Management API returns HTTP403. You cannot change the permissions of a key, so to add one, create a new key. For more information, see Creating a Connect API key in Adverity.
Retrieving usage metrics
The GET /api/v1/usage/ endpoint returns finalized row-usage metrics grouped by date, workspace, and datastream. Results are scoped to the API key’s workspace and all workspaces beneath it.
To retrieve usage metrics, follow these steps:
-
Create a GET request to the following endpoint:
https://{{INSTANCE}}/api/v1/usage/ -
In the HTTP request header, include the parameter
Authorizationwith valueBearer {{KEY}}. -
(Optional) Append query parameters to filter or adjust the response. For more information, see Query parameters.
-
Send the request.
As a result, you obtain a paginated list of row-usage metrics.
Import the request example as raw text to your HTTP client (such as Postman). The cURL request example is the following:
curl -G 'https://{{INSTANCE}}/api/v1/usage/' \
--header 'Authorization: Bearer {{KEY}}' \
--data-urlencode 'granularity=monthly' \
--data-urlencode 'date_from=2026-05-01' \
--data-urlencode 'date_to=2026-06-18' \
--data-urlencode 'workspace_id={{WORKSPACE_UUID}}'
Query parameters
Scroll horizontally to see the full table.
Parameter | Description |
|---|---|
| Reporting granularity. Accepted values: |
| Start date in |
| End date in |
| UUID of a workspace to filter by. Repeatable to include multiple workspaces. Results are limited to workspaces within the API key’s subtree — unknown or out-of-scope UUIDs are silently ignored. |
| UUID of a datastream to filter by. Repeatable to include multiple datastreams. Unknown or out-of-scope UUIDs are silently ignored. |
| Page number for pagination. Default: |
| Number of results per page. Default: |
Response fields
The response contains an items array and a count field with the total number of matching records. Each item in items represents one date × workspace × datastream bucket:
Scroll horizontally to see the full table.
Field | Description |
|---|---|
| The start of the reporting period. For |
| UUID of the workspace. |
| Name of the workspace. Returned inline so no follow-up lookup is needed. |
| UUID of the datastream. |
| Number of unique rows processed. Never |
| Total number of rows processed, including duplicates. Never |