session
List sessions
Changed onRetrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
get/api/session
Request
- Base URLhttps://opencode.ai (the document declares no server; this is the origin it was published from)
- URLhttps://opencode.ai/api/session
- Authnone required
Query parameters
limitstring nullable
Maximum number of sessions to return. Defaults to the newest 50 sessions.
order'asc' | 'desc' nullable
Session order for the first page. Use desc for newest first or asc for oldest first.
searchstring nullable
archived'true' | 'false' nullable
directorystring
projectstring
subpathstring
cursorstring
Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.
Response
SessionsResponse
Changes
- info
added the optional property
/////to the response with the status
- info
- warning
removed the optional property
//from the response with the status
- warning