Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Get Agent Session

GET/api/v2/agents/agentSessions/{agentSessionId}
Warning

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 metadata of an Agent session.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:agents-read.

Path parameters

agentSessionId
string

Identifies an Agent session.

Query parameters

preview
booleanoptional

Enables the use of preview functionality.

Response body

AgentSession
object
Hide child attributes

Hide child attributes

id
string

Identifies an Agent session.

agentRid
string

The Agent the session was created for.

agentApiNameIdentifier
objectoptional

The Agent API name and ontology RID for the Agent the session was created for. Empty if the Agent does not have an ontology binding.

Show child attributes

Show child attributes

agentVersion
string

The Agent version the session was created for.

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/agents/agentSessions/3fa85f64-5717-4562-b3fc-2c963f66afa6?preview=true"

Response

Copied!
1 2 3 4 5 6 7 8 9 { "agentRid": "ri.agent-engine..agent-definition.0b1a801c-de31-4c3d-96a6-e8a1a6a0c1b2", "agentVersion": "1.2.0", "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "agentApiNameIdentifier": { "agentApiName": "customerSupportAgent", "ontology": "example-ontology" } }

Error responses

Error Name
UnsupportedAgentError CodeINVALID_ARGUMENT
Status Code400
DescriptionThe Agent is not supported by this API.
Parameters
AgentSessionNotFoundError CodeNOT_FOUND
Status Code404
DescriptionThe given AgentSession could not be found.
ParametersagentSessionId