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

# Vault 一覧

> カーソルページネーションとオプション検索で、現在のアカウント配下の Vault 一覧を取得します。

`GET /api/v1/cloud/vaults`

現在のアカウント配下の Vault 一覧を取得します。カーソルページネーションとオプションの名前検索をサポートします。アーカイブ済み Vault はデフォルトで除外されます。

## ヘッダー

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

## クエリパラメータ

| パラメータ              | 型       | 必須  | 説明                                                                               |
| ------------------ | ------- | --- | -------------------------------------------------------------------------------- |
| `limit`            | integer | いいえ | 1 ページあたりの返却件数上限。デフォルト 20、範囲は 1〜100。100 を超える値は `400 invalid_request_error` を返します。 |
| `page`             | string  | いいえ | Claude スタイルの前方カーソル。`after_id` と等価。`before_id` および `after_id` と相互排他               |
| `after_id`         | string  | いいえ | カーソルページネーション：この ID 以降のレコードを返す。`page` および `before_id` と相互排他                       |
| `before_id`        | string  | いいえ | カーソルページネーション：この ID 以前のレコードを返す。`page` および `after_id` と相互排他                        |
| `include_archived` | boolean | いいえ | `true` に設定するとアーカイブ済み Vault も含む                                                   |
| `name`             | string  | いいえ | 表示名で Vault を検索                                                                   |

## リクエスト例

```bash theme={null}
# すべての Vault を取得
curl -X GET https://api.qoder.com/api/v1/cloud/vaults \
  -H "Authorization: Bearer $QODER_PAT"

# ページネーション
curl -X GET "https://api.qoder.com/api/v1/cloud/vaults?limit=2" \
  -H "Authorization: Bearer $QODER_PAT"

# 名前で検索、アーカイブ済み Vault も含む
curl -X GET "https://api.qoder.com/api/v1/cloud/vaults?name=my-mcp&include_archived=true" \
  -H "Authorization: Bearer $QODER_PAT"
```

## レスポンス例

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "id": "vault_019e3bb940277f0db05ab74291acf6ef",
      "type": "vault",
      "display_name": "my-mcp-vault",
      "metadata": {},
      "archived_at": null,
      "created_at": "2026-05-18T15:34:16.874877Z",
      "updated_at": "2026-05-18T15:34:16.874877Z"
    }
  ],
  "next_page": null,
  "first_id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "last_id": "vault_019e3bb940277f0db05ab74291acf6ef",
  "has_more": false
}
```

### 空一覧レスポンス

```json theme={null}
{
  "data": [],
  "next_page": null,
  "first_id": null,
  "last_id": null,
  "has_more": false
}
```

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

| フィールド       | 型              | 説明                                                                  |
| ----------- | -------------- | ------------------------------------------------------------------- |
| `data`      | array          | [Vault オブジェクト](/ja/cloud-agents/api/vaults/schemas#vault-object)の配列 |
| `next_page` | string \| null | 次ページの前方カーソル。`has_more` が `true` のとき `page` として使用                    |
| `first_id`  | string \| null | 現在ページ先頭レコードの ID                                                     |
| `last_id`   | string \| null | 現在ページ末尾レコードの ID（カーソルページネーション用）                                      |
| `has_more`  | boolean        | さらにページがあるかどうか                                                       |

## エラー

| HTTP | type                    | トリガー条件                                                     |
| ---- | ----------------------- | ---------------------------------------------------------- |
| 400  | `invalid_request_error` | `limit` 無効、または `page`、`before_id`、`after_id` のうち複数が指定されている |
| 401  | `TOKEN_INVALID`         | 認証トークンが欠落または無効                                             |

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

## 関連項目

<CardGroup cols={2}>
  <Card title="Vaults" icon="key" href="/ja/cloud-agents/vaults">
    シークレットを安全に保存し、Agent Session に注入する。
  </Card>
</CardGroup>
