Usage
View as Markdown

Aggregate usage for a subscription over a period

Needs the usage:read scope, or a full-access key. About scopes

GET
/api/v1/usage-events/aggregate

Authorization

Authorization
Required
Bearer <token>

An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).

In: header

Query Parameters

subscription_id
Required
string

Format: "uuid"

period_start
Required
string

Format: "date-time"

period_end
Required
string

Format: "date-time"
curl -X GET "https://globalymint.com/api/v1/usage-events/aggregate?subscription_id=3fa85f64-5717-4562-b3fc-2c963f66afa6&period_start=2019-08-24T14%3A15%3A22Z&period_end=2019-08-24T14%3A15%3A22Z" \
  -H "Authorization: Bearer <token>"

Aggregated usage.

{
  "data": {
    "total_units": "1999"
  },
  "_agent": {
    "summary": "string",
    "status": "ok",
    "next_actions": [
      "string"
    ],
    "warnings": [
      "string"
    ]
  },
  "api_version": "2026-07-01"
}