GET/v2/action-gateway/sessions/search

Search Sessions

Returns the sessions you can see whose name, actor_id, session_urn, or agentName contains query, case-insensitively, ranked across the whole result set. Cursor-paged with page_size and page_token; no total is reported.

4 parameters
querystringoptional
Matched case-insensitively as a substring of name, `actor_id`, `session_urn`, or `agentName`. Empty matches every session you can see. Results are ordered by match quality (an exact name, `session_urn`, or `actor_id` match, then a prefix, then a substring), then by name, across the whole result set, so a client must not re-sort a page to rank it.
end_user_idstringoptional
`end_user_id`, when set, is an exact filter on `actor_id` (the same filter as on the session list) and combines with query as AND.
page_sizeintegeroptional
Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400.
Default:20
page_tokenstringoptional
`next_page_token` from the previous response. Valid only with the same query and `end_user_id`; otherwise the request is rejected with 400.

6 status codes
200The request was successful.
sessionsarray<object>optional
Matching sessions in rank order.
next_page_tokenstringoptional
Token for the next page; empty on the last page.
400There was an error parsing the request body.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
401Authentication failed due to invalid credentials.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429The API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500There was a server error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.

Error handling

A 400 is returned: There was an error parsing the request body. A 401 is returned: Authentication failed due to invalid credentials. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.