> ## 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.

# Session スレッド一覧

> managed-agent Session 内のスレッドを一覧表示します。

`GET /api/v1/cloud/sessions/{session_id}/threads`

Session 内のスレッドを取得します。Coordinator スレッドが子スレッドより前に一覧表示されます。

## パスパラメータ

| パラメータ        | 型      | 説明                            |
| ------------ | ------ | ----------------------------- |
| `session_id` | string | `sess_` プレフィックス付きの Session ID |

## ヘッダー

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

## クエリパラメータ

| パラメータ   | 型       | 必須  | 説明                                                                             |
| ------- | ------- | --- | ------------------------------------------------------------------------------ |
| `limit` | integer | いいえ | 返却するスレッドの最大数。デフォルトは 20、範囲は 1〜100。100 を超える値は `400 invalid_request_error` を返します。 |
| `page`  | string  | いいえ | 前回のレスポンスの `next_page` から取得した不透明なカーソル                                           |

## リクエスト例

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/sessions/sess_019f00000000000000000000000000aa/threads?limit=10" \
  -H "Authorization: Bearer $QODER_PAT"
```

## レスポンス例

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "id": "sthr_019f00000000000000000000000001aa",
      "type": "session_thread",
      "session_id": "sess_019f00000000000000000000000000aa",
      "parent_thread_id": null,
      "agent": {"id": "agent_019f000000000000000000000000001a", "type": "agent", "version": 1},
      "status": "idle",
      "stats": null,
      "archived_at": null,
      "created_at": "2026-06-15T08:00:00.000Z",
      "updated_at": "2026-06-15T08:05:00.000Z"
    }
  ],
  "first_id": "sthr_019f00000000000000000000000001aa",
  "has_more": false,
  "last_id": "sthr_019f00000000000000000000000001aa",
  "next_page": null
}
```

## レスポンスフィールド

| フィールド       | 型                                                                                      | 説明                      |
| ----------- | -------------------------------------------------------------------------------------- | ----------------------- |
| `data`      | array of [Session Thread](/ja/cloud-agents/api/sessions/schemas#session-thread-object) | スレッドオブジェクト              |
| `has_more`  | boolean                                                                                | このページを超えてさらに結果が利用可能かどうか |
| `first_id`  | string \| null                                                                         | 現在のページの最初のスレッドの ID      |
| `last_id`   | string \| null                                                                         | 現在のページの最後のスレッドの ID      |
| `next_page` | string \| null                                                                         | 次のページの不透明なカーソル          |

## エラー

| HTTP | type                    | トリガー条件           |
| ---- | ----------------------- | ---------------- |
| 400  | `invalid_request_error` | 無効なページネーションパラメータ |
| 401  | `authentication_error`  | PAT が無効または期限切れ   |
| 404  | `not_found_error`       | Session が存在しない   |

**HTTP 404 Not Found**

```json theme={null}
{
  "type": "error",
  "request_id": "cb80235f-76a2-4ff3-9e28-5aa2da12dc14",
  "error": {
    "type": "not_found_error",
    "message": "Session 'sess_doesnotexist_xxxxxxxxxxxxxxxxxxxxxxxx' was not found."
  }
}
```

完全なエラーエンベロープリファレンスは [エラー](/ja/cloud-agents/api/conventions/errors) を参照してください。

## 関連項目

<CardGroup cols={2}>
  <Card title="Managed Agents" icon="user-gear" href="/ja/cloud-agents/managed-agents">
    Coordinator と子スレッドの協調モデルを学びます。
  </Card>

  <Card title="Thread をアーカイブ" icon="archive" href="/ja/cloud-agents/api/sessions/archive-thread">
    特定の子スレッドを終了します。
  </Card>

  <Card title="Session Thread オブジェクト" icon="layer-group" href="/ja/cloud-agents/api/sessions/schemas#session-thread-object">
    Session Thread オブジェクトの完全なフィールドリファレンス。
  </Card>
</CardGroup>
