Skip to main content
GET
List sessions

Authorizations

Authorization
string
header
required

A gbr_pat_ access token. Scopes are recorded on the token when it is minted.

Query Parameters

limit
integer

How many to return, 1–100. Default 20.

Required range: 1 <= x <= 100
order
enum<string>

Newest first (desc, the default) or oldest first (asc).

Available options:
asc,
desc
after
string

The last_id of the previous page. A cursor this collection cannot place — expired, deleted, or never issued — answers with an empty page rather than starting over, so a paging loop ends instead of repeating itself.

status
enum<string>

Only sessions in this state. requires_action is the one to ask for after a restart: it is everything waiting on your code.

Available options:
idle,
working,
requires_action,
failed
source
enum<string>

api for sessions your code created, console for ones a person made in the Console. A list is organization-wide, so without this a second client sharing the organization appears in yours.

Available options:
api,
console
created_by_token
string

Only the sessions one token created — me for the token making this call. The narrowest answer to "which of these are mine", and the one to reach for when several integrations share an organization.

metadata
string

One of your own labels, as key:value?metadata=job:8842. Finds the session for a job without keeping a map of your own.

Response

List the organization's sessions.

object
string
required

Always list. Names the shape, so a value can be identified without knowing which call returned it.

Allowed value: "list"
data
object[]
required
has_more
boolean
last_id
string | null