メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.qoder.com/llms.txt

Use this file to discover all available pages before exploring further.

GET /v1/sessions/{session_id}/events Session 内のイベント一覧を時系列順(昇順)で取得します。カーソルページネーションをサポートします。

パスパラメータ

パラメータ説明
session_idstringSession ID(sess_ プレフィックス)

ヘッダー

名称必須
AuthorizationはいBearer $QODER_PAT

クエリパラメータ

パラメータ必須説明
limitintegerいいえ返却件数の上限、デフォルト 20
after_idstringいいえカーソルページネーション:このイベント ID 以降のレコードを返す
before_idstringいいえカーソルページネーション:このイベント ID 以前のレコードを返す

リクエスト例

curl -X GET "https://openapi.qoder.sh/api/v1/cloud/sessions/sess_019e392c0d1e74e095d21ea4c6b41def/events?limit=5" \
  -H "Authorization: Bearer $QODER_PAT"

レスポンス例

HTTP 200 OK
{
  "data": [
    {
      "id": "evt_019e392c0d787cfaa21bda98e06cd913",
      "type": "user.message",
      "content": "こんにちは、テストメッセージです",
      "session_id": "sess_019e392c0d1e74e095d21ea4c6b41def",
      "turn_id": "turn_019e392c0d787ceea6bb62943f9ac3ec",
      "schema_version": "1.0",
      "created_at": "2026-05-18T03:40:48.888851795Z",
      "processed_at": "2026-05-18T03:40:48.888851795Z"
    },
    {
      "id": "evt_771c1195bcbd4a07834d4ed4dd6450ca",
      "type": "session.status_rescheduled",
      "session_id": "sess_019e392c0d1e74e095d21ea4c6b41def",
      "turn_id": "turn_019e392c0d787ceea6bb62943f9ac3ec",
      "schema_version": "1.0",
      "created_at": "2026-05-18T03:40:50.321Z",
      "processed_at": "2026-05-18T03:40:50.321Z"
    }
  ],
  "first_id": "evt_019e392c0d787cfaa21bda98e06cd913",
  "last_id": "evt_771c1195bcbd4a07834d4ed4dd6450ca",
  "has_more": true
}

イベントタイプリファレンス

type説明固有フィールド
user.messageユーザーメッセージcontent (string)
agent.messageAgent の応答content (ContentBlock[])
agent.thinkingAgent の思考-
session.status_rescheduledSession が実行スケジュールされた-
session.status_idleSession がアイドルに戻ったusage, status, stop_reason
session.errorSession 実行エラーerror, details, retry_status
span.model_request_startモデルリクエスト開始-
span.model_request_endモデルリクエスト終了-
terminated実行終了-

agent.messagecontent 形式

{
  "content": [
    {
      "type": "text",
      "text": "Agent の応答テキスト内容"
    }
  ]
}

session.status_idle の追加フィールド

{
  "type": "session.status_idle",
  "status": "idle",
  "usage": {
    "input_tokens": 150,
    "output_tokens": 42,
    "cache_read_input_tokens": 0,
    "cache_creation_input_tokens": 0
  },
  "stop_reason": {
    "type": "end_turn"
  }
}

session.error 形式

{
  "type": "session.error",
  "error": {
    "message": "The operation was aborted due to timeout",
    "type": "unknown_error"
  },
  "details": {
    "message": "The operation was aborted due to timeout",
    "name": "TimeoutError"
  },
  "retry_status": {
    "type": "exhausted"
  }
}

ページネーションフィールド

フィールド説明
dataarrayイベントオブジェクトリスト
first_idstring現在ページ先頭レコードの ID
last_idstring現在ページ末尾レコードの ID
has_morebooleanさらにレコードがあるかどうか

エラーレスポンス

HTTPtype説明
401authentication_errorPAT が無効または期限切れ
404not_found_errorSession が存在しない