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

# セッションの取得

> ID を指定して Forward セッションを取得します。

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

安定した Forward セッションフィールドを返します。ランタイムのプライベートフィールドは既定では公開されません。

## Headers

| Header          | Required | Description    |
| --------------- | -------- | -------------- |
| `Authorization` | Yes      | `Bearer <PAT>` |

## Path parameters

| Parameter    | Type   | Required | Description |
| ------------ | ------ | -------- | ----------- |
| `session_id` | string | Yes      | Session ID。 |

## Example request

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

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "sess_xxx",
  "type": "session",
  "identity_id": "idn_xxx",
  "template": {
    "id": "tmpl_support",
    "type": "template",
    "name": "Support assistant",
    "model": "ultimate",
    "version": 3
  },
  "source_type": "api",
  "status": "running",
  "title": "Customer support session",
  "incremental_streaming_enabled": true,
  "metadata": {
    "source": "web"
  },
  "config": {
    "environment_variables": {
      "API_KEY": "sk-xxx"
    }
  },
  "stats": {
    "active_seconds": 30,
    "duration_seconds": 3600
  },
  "usage": {
    "credits": 12.5
  },
  "archived_at": null,
  "created_at": "2026-06-22T10:00:00Z",
  "updated_at": "2026-06-22T11:00:00Z"
}
```

## Response fields

Session オブジェクトを返します。

## Errors

| HTTP | Type                   | Code                      | Trigger                       |
| ---- | ---------------------- | ------------------------- | ----------------------------- |
| 401  | `authentication_error` | `authentication_required` | PAT が無効または期限切れ。               |
| 404  | `not_found_error`      | `session_not_found`       | Session が存在しないか、呼び出し元に表示されない。 |

## Notes

* Forward はランタイムの情報を読み取る前に、アカウントと Template の所有権を検証します。
* 基盤となるランタイムセッションが見つからない場合、Forward は `404 session_not_found` を返します。

## Related

<CardGroup cols={2}>
  <Card title="セッションの更新" icon="pencil" href="/cloud-agents/api/forward/sessions/update" />

  <Card title="セッションイベントの一覧取得" icon="list" href="/cloud-agents/api/forward/sessions/list-events" />
</CardGroup>
