Everstack
API ReferenceOpenai agents restList Session Events

List Session Events

GET/v1/openai-agents/sessions/{session-id}/events
GET/v1/openai-agents/sessions/{session-id}/events

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Parameters

NameInTypeRequiredDescription
session-idpathstringYes
afterqueryintegerNo
limitqueryintegerNo

Responses

200 Success

PropertyTypeDescription
dataobject[]
next_cursorinteger
has_moreboolean

400 Invalid request

PropertyTypeDescription
errorobject

403 Permission denied

PropertyTypeDescription
errorobject

404 Not found

PropertyTypeDescription
errorobject

500 Internal error

PropertyTypeDescription
errorobject

503 Unavailable

PropertyTypeDescription
errorobject

Request

curl -X GET "http://localhost:8089/v1/openai-agents/sessions/{session-id}/events" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
const response = await fetch("http://localhost:8089/v1/openai-agents/sessions/{session-id}/events", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
});
const data = await response.json();
import requests

response = requests.get(
    "http://localhost:8089/v1/openai-agents/sessions/{session-id}/events",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
)
data = response.json()

Response

{
  "data": [
    {
      "cursor": 0,
      "event_id": "string",
      "type": "string",
      "version": "string",
      "upstream_item_id": "string",
      "tool_failed": true,
      "created_at": "string"
    }
  ],
  "next_cursor": 0,
  "has_more": true
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}