Session review

List sessions and read event timelines in Architect.

dev · https://api.dev.relay.oprag.ai

All 3 endpoints on this page require a Cognito JWT from Architect. An organization secret returns 401 on every one.

GET /v1/organizations/me/sessions

List captured sessions for review in Architect.

Auth Cognito JWT member+

Path parameters

None.

Query parameters

Name Type Required Default Description
cursor string Optional Base64url-encoded offset cursor from nextCursor. Omit for the first page (max 200 sessions loaded, then sliced).
limit number Optional 50 Page size. Clamped to 100; invalid values fall back to 50.
environmentId string Optional Filter to one environment.
agentId string Optional Filter to one agent catalog id.
secretEnvironment string Optional live Which secret plane to list. live (default) hides sk_test_ sessions; test shows only test; all includes both.

Body parameters

None.This endpoint does not read a request body.

Response

200 Success

JSON
{
  "sessions": [
    {
      "sessionId": "sess_abc123",
      "organizationId": "org_abc123",
      "environmentId": "env_abc123",
      "agentInstallationId": "inst_abc123",
      "agentId": "cursor",
      "status": "completed",
      "secretEnvironment": "live",
      "title": "Fix auth middleware",
      "startedAt": "2026-08-28T12:00:00.000Z",
      "endedAt": "2026-08-28T12:30:00.000Z",
      "eventCount": 42,
      "createdAt": "2026-08-28T12:00:00.000Z",
      "updatedAt": "2026-08-28T12:30:00.000Z"
    }
  ],
  "nextCursor": null
}

Status codes

Status Meaning
200 Success.
401 Missing or expired JWT.
403 Insufficient organization role.
429 Rate limited. See rate limits.
503 Service unavailable.

curl

Shell
curl -X GET 'https://api.dev.relay.oprag.ai/v1/organizations/me/sessions' \
  -H 'Authorization: Bearer <Cognito JWT>'
GET /v1/organizations/me/sessions/{sessionId}

Fetch one session with metadata for the review UI.

Auth Cognito JWT member+

Path parameters

Name Type Required Description
sessionId string Required Session id returned from POST /v1/sessions.

Query parameters

None.This endpoint does not read query parameters.

Body parameters

None.This endpoint does not read a request body.

Response

200 Success

JSON
{
  "session": {
    "sessionId": "sess_abc123",
    "organizationId": "org_abc123",
    "environmentId": "env_abc123",
    "agentInstallationId": "inst_abc123",
    "agentId": "cursor",
    "status": "completed",
    "secretEnvironment": "live",
    "title": "Fix auth middleware",
    "startedAt": "2026-08-28T12:00:00.000Z",
    "endedAt": "2026-08-28T12:30:00.000Z",
    "eventCount": 42,
    "createdAt": "2026-08-28T12:00:00.000Z",
    "updatedAt": "2026-08-28T12:30:00.000Z"
  }
}

Status codes

Status Meaning
200 Success.
401 Missing or expired JWT.
403 Insufficient organization role.
404 Resource not found in this organization.
429 Rate limited. See rate limits.
503 Service unavailable.

curl

Shell
curl -X GET 'https://api.dev.relay.oprag.ai/v1/organizations/me/sessions/{sessionId}' \
  -H 'Authorization: Bearer <Cognito JWT>'
GET /v1/organizations/me/sessions/{sessionId}/events

Page through events for a session.

Auth Cognito JWT member+

Path parameters

Name Type Required Description
sessionId string Required Session id returned from POST /v1/sessions.

Query parameters

Name Type Required Default Description
cursor string Optional Opaque event cursor from nextCursor for the next page.
limit number Optional 100 Maximum events per page. Defaults to 100 when omitted. Invalid or non-numeric values are not clamped and may yield an empty page.

Body parameters

None.This endpoint does not read a request body.

Response

200 Success

JSON
{
  "events": [
    {
      "sessionId": "sess_abc123",
      "eventId": "evt_001",
      "sequence": 1,
      "eventType": "tool.call",
      "payload": { "tool": "grep" },
      "createdAt": "2026-08-28T12:01:00.000Z"
    }
  ],
  "nextCursor": null
}

Status codes

Status Meaning
200 Success.
401 Missing or expired JWT.
403 Insufficient organization role.
404 Resource not found in this organization.
429 Rate limited. See rate limits.
503 Service unavailable.

curl

Shell
curl -X GET 'https://api.dev.relay.oprag.ai/v1/organizations/me/sessions/{sessionId}/events' \
  -H 'Authorization: Bearer <Cognito JWT>'

Ready to ship?

Get started free