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

Query Session

GET /api/project/{projectId}/integration/api/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
data
object
The session data containing variables, messages, and other session information
createdAt
string
ISO 8601 timestamp when the session was created
updatedAt
string
ISO 8601 timestamp when the session was last updated

Example

Request

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

Response

{
  "sessionId": "user-123-session-456",
  "data": {
    "variables": {
      "userName": "John Doe",
      "userRole": "admin"
    },
    "messages": [
      {
        "role": "user",
        "content": "Hello"
      },
      {
        "role": "assistant",
        "content": "Hi! How can I help you today?"
      }
    ]
  },
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:35:00.000Z"
}

Usage Notes

  • Session ID: Use the same session ID that was created via the Create Session endpoint
  • Data Structure: The data field contains all session information including variables and conversation history
  • Timestamps: All timestamps are in ISO 8601 format (UTC)

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"
  }
}