PT EN

Consumo

URL base: $CONSUMER_API

Operações

Listar consumos

Registos

GET /consumption

Pages the computed consumption records of one account linked to the caller, such as usage per billing cycle. account_id is required (400 without it) and the caller needs read access to that account, otherwise 403. Pagination uses limit and after.

Parâmetros

tenant_idstring · consulta · obrigatório

Tenant (utility workspace) that owns the account; when omitted it is worked out from the caller's account memberships.

account_idstring · consulta · obrigatório

Required identifier of the linked account whose consumption is listed.

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

meter_idstring · consulta · opcional

Returns only consumption measured by this meter of the account.

cycle_idstring · consulta · opcional

Returns only consumption for this billing cycle.

Devolve

200 Account consumption after membership authorization

curl -X GET "$CONSUMER_API/consumption" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Account consumption after membership authorization