メインコンテンツへスキップ
GET /v1/sessions/{session_id}/threads Session 内のすべてのスレッドを取得します。Session でまだスレッドが作成されていない場合、システムは自動的に Coordinator メインスレッドを作成します。

ヘッダー

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

パスパラメータ

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

クエリパラメータ

パラメータ必須説明
limitintegerいいえ返却件数の上限。デフォルト 20
orderstringいいえソート方向: asc(デフォルト)または desc
before_idstringいいえカーソルページネーション: この ID 以前のレコードを返却
after_idstringいいえカーソルページネーション: この ID 以降のレコードを返却
statuses[]stringいいえスレッドステータスでフィルタリング。複数値をサポート: idlerunningarchivedterminatedblocked

リクエスト例

curl -X GET "https://api.qoder.com/api/v1/cloud/sessions/sess_019f00000000000000000000000000aa/threads" \
  -H "Authorization: Bearer $QODER_PAT"

ステータスによるフィルタリング

curl -X GET "https://api.qoder.com/api/v1/cloud/sessions/sess_019f00000000000000000000000000aa/threads?statuses[]=running&statuses[]=idle" \
  -H "Authorization: Bearer $QODER_PAT"

レスポンス例

HTTP 200 OK
{
  "data": [
    {
      "id": "sthr_019f00000000000000000000000001aa",
      "type": "session_thread",
      "session_id": "sess_019f00000000000000000000000000aa",
      "parent_thread_id": null,
      "agent": {
        "id": "agent_019f000000000000000000000000001a",
        "type": "agent",
        "name": "task-coordinator",
        "model": "ultimate",
        "version": 1
      },
      "agent_id": "agent_019f000000000000000000000000001a",
      "agent_version": 1,
      "name": "",
      "role": "coordinator",
      "status": "idle",
      "stop_reason": {"type": "end_turn"},
      "created_by_tool_use_id": null,
      "archived_at": null,
      "created_at": "2026-06-15T08:00:00.000Z",
      "updated_at": "2026-06-15T08:05:00.000Z"
    },
    {
      "id": "sthr_019f00000000000000000000000002bb",
      "type": "session_thread",
      "session_id": "sess_019f00000000000000000000000000aa",
      "parent_thread_id": "sthr_019f00000000000000000000000001aa",
      "agent": {
        "id": "agent_019f000000000000000000000000002b",
        "type": "agent",
        "name": "Research Agent",
        "model": "ultimate",
        "version": 2
      },
      "agent_id": "agent_019f000000000000000000000000002b",
      "agent_version": 2,
      "name": "Research Agent",
      "role": "child",
      "status": "running",
      "stop_reason": {},
      "created_by_tool_use_id": "toolu_bdrk_01T42NPLcKrBvLJfWgGt3QMt",
      "archived_at": null,
      "created_at": "2026-06-15T08:01:00.000Z",
      "updated_at": "2026-06-15T08:01:00.000Z"
    }
  ],
  "first_id": "sthr_019f00000000000000000000000001aa",
  "last_id": "sthr_019f00000000000000000000000002bb",
  "has_more": false
}

レスポンスフィールド

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

エラーコード

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

関連項目

Managed Agents

Coordinator と子スレッドを使用したマルチ Agent 協調の全体像を確認します。

Thread をアーカイブ

子スレッドを終了して保留中のメッセージをキャンセルします。

スレッドイベント一覧

特定スレッドのイベントを時系列順に取得します。

Session Thread オブジェクト

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