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

Filter metrics by workflow identifier.

modelUuid
string

Filter metrics by model identifier.

connectorUuid
string

Filter metrics by connector identifier.

integrationSlug
string

Filter metrics by integration slug.

slug
string

Filter metrics by slug.

agentUuid
string

Filter metrics by agent identifier.

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.