On this page
sessions
query · in the family Billing and the wallet
What it does
Your group’s sittings, newest first — every sign-in makes one, and ended sittings stay on the list so their usage can still be drilled.
ONE page of YOUR group's sessions, NEWEST FIRST: every sign-in/exchange mints one; terminals stay listed (an ended sitting still has usage to drill — no-delete); doomed drops per page. limit clamps to [1, 200], default 100; nextToken = the prior page's cursor, verbatim — opaque + tenant-bound (a malformed or foreign token refuses VALIDATION/INVALID). Walk until nextToken is null (doomed drop per page — a page may hold fewer than limit). SELF-group BY CONSTRUCTION (no target arg exists). Requires authentication.
What happens
A read over your own group’s session records, one recent page at a time; nothing changes. It shows who sat when and whether the sitting is still open — it never shows what anyone did (the usage page answers that).
Who may call it
Capability area: Billing and the wallet — Your platform bill, token purchases and the usage and cost reads.
- Owner
- Manager
- Associate Manager
- An API key whose scope allows
api:sessions
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
Returns
SessionPage SessionPage! — One NEWEST-FIRST page of the sessions listing.
This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.
Example request
query ExampleSessions($limit: Int) {
sessions(limit: $limit) {
items {
id
kind
status
parentId
orgId
createdAt
updatedAt
}
nextToken
}
}
Variables:
{
"limit": 1
}
Example response
{
"data": {
"sessions": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"kind": "<kind>",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-065235280000",
"orgId": "01900000-0000-7000-8000-b0cf4f3c0000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z"
}
],
"nextToken": "<the cursor from the previous page>"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)