This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Get the state of an Agent session.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:agents-read.
stringoptionalThe minimum session state the response must include. If the requested state is not yet available, the
result is behind. When omitted, the API returns the latest session state available to the server.
booleanoptionalEnables the use of preview functionality.
unionThe result of reading Agent session state.
objectoptionalThe server has not yet observed the requested consistency key. The session may or may not have started. Retry the request after a short delay.
objectoptionalThe requested state and its session status are available.
objectoptionalThe session has not started and cannot be read or accept events yet. Retry after a short delay.
1
2
3
curl \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/agents/agentSessions/3fa85f64-5717-4562-b3fc-2c963f66afa6/getSessionState?preview=true"1
2
3
{
"type": "notReady"
}| Error Name | ||
|---|---|---|
Invalid | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The provided consistency key does not match the expected format. | |
| Parameters | consistencyKey | |
Get | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not getSessionState the AgentSession. | |
| Parameters | agentSessionId | |
Agent | Error Code | NOT_FOUND |
| Status Code | 404 | |
| Description | The given AgentSession could not be found. | |
| Parameters | agentSessionId | |
See Errors for a general overview of errors in the platform.