> ## 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 の取得

> ID を指定して Session を取得します。

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

単一の [Session オブジェクト](/ja/cloud-agents/api/sessions/schemas#session-object)を返します。

## パスパラメータ

| パラメータ        | 型      | 説明                            |
| ------------ | ------ | ----------------------------- |
| `session_id` | string | `sess_` プレフィックスを持つ Session ID |

## ヘッダー

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

## リクエスト例

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

## レスポンス例

**HTTP 200 OK**

[Session オブジェクト](/ja/cloud-agents/api/sessions/schemas#session-object)を返します。ネストされた `agent` は [Session embedded agent](/ja/cloud-agents/api/sessions/schemas#session-embedded-agent) の形式に従います。

```json theme={null}
{
  "id": "sess_019ef30a4f0275678965d496ab542ef0",
  "type": "session",
  "agent": {
    "description": "",
    "id": "agent_019eda46c02b754499cdd3e282dbb8f1",
    "mcp_servers": [],
    "model": {
      "id": "ultimate",
      "effective_context_window": 200000
    },
    "name": "dev-agent",
    "skills": [],
    "system": "You are an expert software engineer.",
    "tools": [{"enabled_tools": ["Bash", "Read", "Write", "Edit", "Glob", "Grep"], "type": "agent_toolset_20260401"}],
    "type": "agent",
    "version": 1
  },
  "archived_at": null,
  "created_at": "2026-06-23T05:53:19.77484Z",
  "deployment_id": null,
  "environment_id": "env_019eed3178647ceb92c821573e9f9bad",
  "environment_variables": {},
  "metadata": {"purpose": "doc-verification"},
  "outcome_evaluations": [],
  "resources": [],
  "stats": {"active_seconds": 0, "duration_seconds": 0},
  "status": "idle",
  "title": "doc-review-test",
  "updated_at": "2026-06-23T05:53:19.77484Z",
  "vault_ids": []
}
```

## エラー

| HTTP | Type                   | 発生条件           |
| ---- | ---------------------- | -------------- |
| 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_does_not_exist_0000000000000000000000000000' was not found."
  }
}
```

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

## 関連項目

<CardGroup cols={2}>
  <Card title="Session の起動" icon="play" href="/ja/cloud-agents/sessions">
    Agent を環境で実行し、ステートフルな対話を行う。
  </Card>
</CardGroup>
