Skip to main content
GET
https://api.pathors.com
/
project
/
{projectId}
/
session
/
{sessionId}
Query Session
curl --request GET \
  --url https://api.pathors.com/project/{projectId}/session/{sessionId} \
  --header 'Authorization: <authorization>'
{
  "sessionId": "<string>",
  "state": {}
}
Query an existing session to retrieve its data, including variables and conversation history.

Base URL

https://api.pathors.com

Query Session

GET https://api.pathors.com/project/{projectId}/session/{sessionId}

Path Parameters

projectId
string
required
The ID of your project
sessionId
string
required
The unique identifier of the session to query

Request Headers

Authorization
string
required
Bearer token authentication using your API key

Response

sessionId
string
The session ID
state
object
The session state containing variables, messages, and other execution state information

Example

Request

curl -X GET https://api.pathors.com/project/{projectId}/session/user-123-session-456 \
  --header 'Authorization: Bearer <token>'

Response

{
  "sessionId": "user-123-session-456",
  "state": {
    "variables": {
      "userName": "John Doe",
      "userRole": "admin"
    },
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      },
      {
        "role": "assistant",
        "content": "Hi! How can I help you today?"
      }
    ]
  }
}

Usage Notes

  • Session ID: Use the same session ID that was created via the Create Session endpoint
  • State Structure: The state field contains the session execution state including variables and conversation history

Error Responses

Status CodeDescription
400Missing projectId or sessionId
401Invalid authentication
404Session not found
500Internal server error
Example error responses: 404 Not Found:
{
  "error": "Session not found"
}
401 Unauthorized:
{
  "error": {
    "message": "Invalid authentication"
  }
}