メインコンテンツへスキップ
GET /v1/sessions/{session_id}/threads/{thread_id}/events 特定の Session スレッドのイベントを時系列順で取得します。そのスレッドに属するイベントのみを返し、他のスレッドのイベントは除外されます。カーソルページネーションをサポートします。 リクエストの Accept ヘッダーに text/event-stream が含まれる場合、同じルートが SSE ストリーミングに切り替わります。リスト形式のレスポンスが必要な場合は Accept: application/json を使用するか、SSE メディアタイプを省略してください。

ヘッダー

ヘッダー必須説明
AuthorizationはいBearer <PAT>

パスパラメータ

パラメータ必須説明
session_idstringはいSession ID(sess_ プレフィックス)
thread_idstringはいThread ID(sthr_ プレフィックス)

クエリパラメータ

パラメータ必須説明
limitintegerいいえ返却件数の上限。デフォルト 20
after_idstringいいえカーソルページネーション: このイベント ID 以降のレコードを返却
before_idstringいいえカーソルページネーション: このイベント ID 以前のレコードを返却
orderstringいいえソート方向: asc(デフォルト)または desc
typestringいいえイベントタイプでフィルタリング。カンマ区切りの値をサポート
types[]stringいいえtype の配列形式の代替
完全なページネーション仕様は ページネーション を参照してください。

リクエスト例

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

レスポンス例

HTTP 200 OK
{
  "data": [
    {
      "id": "evt_019f0000000000000000000000000101",
      "type": "agent.thread_message_sent",
      "schema_version": "1.0",
      "session_id": "sess_019f00000000000000000000000000aa",
      "session_thread_id": "sthr_019f00000000000000000000000002bb",
      "turn_id": "turn_019f0000000000000000000000000010",
      "direction": "coordinator_to_child",
      "content": "请调研 Cloud Agents API 的最新竞品动态。",
      "from_session_thread_id": "sthr_019f00000000000000000000000001aa",
      "to_session_thread_id": "sthr_019f00000000000000000000000002bb",
      "created_at": "2026-06-15T08:01:00.000Z",
      "processed_at": "2026-06-15T08:01:00.000Z"
    },
    {
      "id": "evt_019f0000000000000000000000000102",
      "type": "session.thread_status_running",
      "schema_version": "1.0",
      "session_id": "sess_019f00000000000000000000000000aa",
      "session_thread_id": "sthr_019f00000000000000000000000002bb",
      "agent_name": "Research Agent",
      "status": "running",
      "created_at": "2026-06-15T08:01:01.000Z",
      "processed_at": "2026-06-15T08:01:01.000Z"
    }
  ],
  "first_id": "evt_019f0000000000000000000000000101",
  "last_id": "evt_019f0000000000000000000000000102",
  "has_more": true
}

レスポンスフィールド

フィールド説明
dataarray of Event objectこのスレッドのイベントリスト。すべてのイベントに session_thread_id フィールドが含まれます
first_idstring | null現在ページ先頭レコードの ID
last_idstring | null現在ページ末尾レコードの ID
has_morebooleanさらにレコードがあるかどうか

エラーコード

HTTPtypeトリガー条件
401authentication_errorPAT が無効または期限切れ
404not_found_errorSession または Thread が存在しない
完全なエラーエンベロープリファレンスは エラー を参照してください。

関連項目

Managed Agents

Coordinator と子スレッドのイベントモデルを確認します。

スレッドイベントストリーム

SSE で同じスレッドイベントをリアルタイム受信します。

Session Threads 一覧

Session 内のすべてのスレッドとそのステータスを取得します。

Event オブジェクト

イベントオブジェクトのフィールド定義を参照します。