Skip to main content
Sessions

スレッドイベントの一覧取得

1 つの Session thread に限定したイベントを一覧取得します。

GET /api/v1/cloud/sessions/{session_id}/threads/{thread_id}/events カーソルページネーションで 1 つの thread の公開イベントを取得します。

パスパラメータ

パラメータ説明
session_idstringsess_ プレフィックス付きの Session ID
thread_idstringsthr_ プレフィックス付きの Thread ID

ヘッダー

ヘッダー必須説明
AuthorizationはいBearer $QODER_PAT

クエリパラメータ

パラメータ必須説明
limitintegerいいえ返すイベントの最大数。デフォルトは 20、範囲は 1〜100。100 を超える値は 400 invalid_request_error を返します。
pagestringいいえ前回のレスポンスの next_page から得られる不透明なカーソル。before_id および after_id とは排他的です
before_idstringいいえこのイベント ID より前の順序のイベントを返します。page および after_id とは排他的です
after_idstringいいえこのイベント ID より後の順序のイベントを返します。page および before_id とは排他的です

リクエスト例

curl -X GET "https://api.qoder.com/api/v1/cloud/sessions/sess_019f00000000000000000000000000aa/threads/sthr_019f00000000000000000000000002bb/events?limit=20" \
  -H "Authorization: Bearer $QODER_PAT"

レスポンス例

{
  "data": [
    {
      "id": "evt_019f00000000000000000000000003cc",
      "type": "agent.message",
      "content": [{"type": "text", "text": "Thread response"}],
      "processed_at": "2026-06-15T08:02:00.000Z"
    }
  ],
  "first_id": "evt_019f00000000000000000000000003cc",
  "has_more": false,
  "last_id": "evt_019f00000000000000000000000003cc",
  "next_page": null
}

レスポンスフィールド

フィールド説明
dataEvent オブジェクト の配列thread に限定されたイベント
has_morebooleanこのページの先にさらに結果があるかどうか
first_idstring | null現在のページの最初のイベントの ID
last_idstring | null現在のページの最後のイベントの ID
next_pagestring | null次ページの不透明なカーソル

エラー

HTTPタイプトリガー条件
400invalid_request_error不正な limit(非整数または非正値)、または pagebefore_id/after_id の同時指定
401authentication_errorPAT が無効または期限切れ
404not_found_errorSession または thread が存在しない
HTTP 404 Not Found
{
  "type": "error",
  "request_id": "cb80235f-76a2-4ff3-9e28-5aa2da12dc14",
  "error": {
    "type": "not_found_error",
    "message": "Session thread 'sthr_fakefakefake_xxxxxxxxxxxxxxxx' was not found."
  },
  "request_id": "b5822072-f264-48da-9d61-6d48ffb07551"
}
完全なエラーエンベロープについては エラー を参照してください。

関連項目