List the turns of a session

GET/o/{org}/p/{project}/sessions/{session}/turns
View .md

Every prompt in the session in order: the one that started it, then each delivered follow-up. A turn is running until the session finishes it, then carries that status and its result. A turn that was still open when the next began ends interrupted. Cost and tokens are the session's, on GET …/sessions/{session}.

Authenticate with an org API key or a signed-in session.

Path parameters

orgstringrequired

The org's slug or id. A caller with no role in the org gets 404.

projectstringrequired

A Project's handle (name) or id, resolved inside {org} — OR the reserved sentinel _ meaning "no Project" (a direct-repo / repo-less dispatch on POST; "no Project constraint, resolve by session id alone" everywhere else). A real handle that doesn't match the session's actual Project is 404.

sessionstringrequired

The session's full id (execution_id).

Responses

200The session's turns.
turnsarray of Turnrequired
7 item fields
idstringrequired
Format uuid
ordinalintegerrequired

1 for the prompt that started the session, then one per delivered follow-up.

min 1
statusstringrequired
One ofrunningcompletedneeds_reviewfailedcancelledexpiredinterrupted
promptstring | nullrequired
resultanyrequired

The turn's answer, as GET …/sessions/{session}/result returned it when the turn ended.

started_atstringrequired
Format date-time
ended_atstring | nullrequired
Format date-time
401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, PLAN_REQUIRED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
404No such resource for the caller, including one that exists in an org the caller cannot see.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, PLAN_REQUIRED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional