List credit usage by billing period

Retrieve the organization's credit position for each of its billing periods, newest first — the same figures GET /v1/credits/usage returns, one entry per period, for building period-over-period tracking on your side.

The period still open carries isCurrent: true and matches GET /v1/credits/usage exactly; starting a walk with no cursor, that is the first entry of the first page. Every entry whose period has already ended is closed and its usage figures are final.

History reaches back to the organization's first recorded day of credit usage — there is no fixed retention cutoff, so the number of periods available grows with the age of the account. Pass cursor to page further back; nextCursor is null once the oldest recorded period has been returned.

One caveat on the allowance fields (planIncludedCredits, complimentaryCredits, includedCredits, overageLimitCredits): they reflect the organization's plan configuration as it stands today, not as it stood during a past period. Runbear does not snapshot plan configuration per period. currentUsageCredits is the field that is genuinely historical, and overageCreditsUsed is derived from it against today's allowance.

get/v1/credits/usage/periods

Request

  • Base URL
    https://api.runbear.io
  • Auth
    HTTP bearer

Query parameters

limitinteger

Maximum number of billing periods to return in this page (1–24). Defaults to 12.

Example:12
cursorstring

Opaque pagination cursor. Pass the nextCursor from a previous response to fetch the next page of periods (ordered newest first). Omit on the first request.

Response

Default Response

nextCursorstring nullable required

Opaque cursor for the next page, or null once the oldest recorded period has been returned. Pass it back as the cursor query parameter.

Changes

No recorded changes to this operation across all 1 revision of this API.