Skip to main content
GET
/
billing
/
usage
/
metrics
Get usage metrics
curl --request GET \
  --url https://api.getcargo.io/v1/billing/usage/metrics \
  --header 'Authorization: Bearer <token>'
{
  "metrics": [
    {
      "date": "<string>",
      "items": [
        {
          "slug": "<string>",
          "count": 123,
          "groupBy": "<string>"
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

workflowUuid
string<uuid>

Filter metrics by workflow identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
modelUuid
string<uuid>

Filter metrics by model identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
connectorUuid
string<uuid>

Filter metrics by connector identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
integrationSlug
string

Filter metrics by integration slug.

slug
string

Filter metrics by slug.

agentUuid
string<uuid>

Filter metrics by agent identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
from
string
required

Start of the time range.

to
string
required

End of the time range.

groupBy
enum<string>

Group metrics by this dimension.

Available options:
integration_slug,
connector_uuid,
model_uuid,
workflow_uuid,
agent_uuid
unit
enum<string>

Usage unit to report.

Available options:
billing.credits,
storage.records,
orchestration.executions

Response

Successful response

metrics
Metrics · object[]
required

Usage metrics for the selected range.