Sessions

List sessions

GET /v1/sessions
Permission
read:sessions
Tokens
API key, CLI user token, Session token

List sessions with filters for time, source, service, agent, user, repository, status, label, annotation, and event.

Query parameters

agentstring

An agent id, or its name. Only sessions that agent started.

sourcearray<SessionSource>
serviceenum

Service that triggered the session, whichever agent answered.

one ofslackgithublinearsentry
daysinteger
startstring, date-time
endstring, date-time
limitdefault 50integer
cursorstring
user_idstring

A user id (see GET /v1/users); keeps only sessions that user started.

repostring

"owner/name" (exact) or a bare repo name. Sessions whose repository is named only inside their agent , dashboard starts, cron , do not match.

statusarray<SessionStatus>

Keep only sessions in these statuses.

labelarray<string>

Keep only items with this label. Repeat to require every one.

annotationarray<string>

Keep only items with this annotation, written `key:value`. Repeat to require every one.

eventstring

A JSON object the session's event must contain, such as {"integration": "github"} or {"body": {"pull_request": {"number": 42}}}. Every field given must match, at any depth. A session with no event never matches.

{
"has_more": bool,
"next_cursor": str,
}

Response

has_moredefault falseboolean

Whether more results exist past this page.

message_countsobject

How many messages each listed session has received, by session id.

next_cursorstring

Pass as `cursor` to fetch the next page. Null on the last page. Opaque , echo it back rather than parsing it.

sessionsarray<Session>required

Lean wire rows , the same shape GET /v1/sessions/{id} and the stream's session frames carry. The heavy blobs (config snapshot, input/output) live on the detail endpoints.

On this page

No Headings
Schedule a demo
For HumansFor Agents