Skip to main content
Sessions

Search sessions

Search sessions by metadata and session filters.

POST /api/v1/cloud/sessions/search Requires x-qoder-beta: search-2026-08-31. All parameters are optional and belong in the JSON body; URL query parameters are ignored.
ParameterTypeDescription
metadataobject<string,string>Exact metadata pairs combined with AND
limitintegerPage size
pagestringCursor returned in next_page
namestringCase-insensitive Session title substring match
orderstringdesc (default) or asc
include_archivedbooleanInclude archived Sessions
statusesarray<string>running, idle, rescheduling, or terminated
agent_idstringFilter by Agent ID
agent_versionintegerFilter by Agent version
deployment_idstringFilter by Deployment ID
memory_store_idstringFilter by mounted Memory Store ID
created_at[gt], created_at[gte]stringExclusive/inclusive RFC 3339 lower bound
created_at[lt], created_at[lte]stringExclusive/inclusive RFC 3339 upper bound
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/sessions/search" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" -H "Content-Type: application/json" \
  -H "x-qoder-beta: search-2026-08-31" \
  -d '{"metadata":{"ticket":"A-123"},"statuses":["idle"],"limit":20}'

Response

FieldTypeDescription
dataarrayResources in the current page; see the corresponding List endpoint for resource fields
first_idstring | nullFirst resource ID in the current page
last_idstring | nullLast resource ID in the current page
has_morebooleanWhether another page is available
next_pagestring | nullCursor for the next page, or null when there is no next page
totalinteger | nullTotal resources matching the filters on the first page; null when page is used
{
  "data": [],
  "first_id": null,
  "has_more": false,
  "last_id": null,
  "next_page": null,
  "total": 0
}
Resource fields in data match List sessions. Metadata keys are 1–64 characters and values are strings up to 512 characters. The default in-flight limit is 10; excess requests return 429 rate_limit_error.