Skip to main content
GET
Report consumption over a period

Authorizations

Authorization
string
header
required

Enforced on every transport, with no exempt operation. A person's request — over the default local unix socket exactly as over a TCP listener — must carry a JWT issued by the configured identity provider, which the host verifies itself against that issuer's key set: signature, issuer, expiry, and the person and organisation it names. Requests without a valid one receive 401 NRY-0011. The socket's file permissions are transport and are not an authorisation.

Query Parameters

from
string<date-time>
required

Start of the period, inclusive.

to
string<date-time>
required

End of the period, exclusive.

groupBy
enum<string>
default:model

Grouping dimension. model is the default and the answer an older client that sends none keeps getting. day is the UTC day the round was stamped with, which is the store's own clock and not the caller's. repository and person are read off the conversation each round ran in. A dimension this version does not serve is refused naming itself.

Available options:
model,
day,
repository,
conversation,
person
cursor
string

Opaque pagination cursor from a previous page's nextCursor or prevCursor.

Maximum string length: 1024
limit
integer
default:25

Maximum items per page.

Required range: 1 <= x <= 100

Response

The usage report.

Consumption over a period, broken down by the requested dimension. One page of it: the rows are ordered by their own group key ascending — the model name, the UTC day, the repository path, the conversation id or the person's subject, whichever was asked for — and the withheld private group, which has no key of its own, comes first. A key is unique per group by construction, so there is no tie to break and the cursor is simply the last key served.

from
string<date-time>
required
to
string<date-time>
required
groupBy
enum<string>
required

The dimension these rows are grouped by, echoed from the request.

Available options:
model,
day,
repository,
conversation,
person
rows
object[]
required
nextCursor
string

Pass as cursor for the next page, with the same groupBy. A cursor issued for one grouping is refused by another rather than re-interpreted against a key it does not name. Absent on the last page.