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

# リソース一覧を取得する

> 指定した 1 つのタイプの Forward 登録済みリソースを一覧表示します。

`GET /api/v1/forward/resources`

現在の呼び出し元が所有するリソースを返します。リソースが引き続き参照可能な場合、結果には最新の `resource_spec` データが含まれます。

## Headers

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

## Query parameters

| Parameter   | Type    | Required | Default | Description                                           |
| ----------- | ------- | -------- | ------- | ----------------------------------------------------- |
| `type`      | string  | Yes      | -       | リソースタイプ: `skill`、`file`、`vault`、または `environment`。    |
| `limit`     | integer | No       | 20      | 1 ページあたりの件数。最大 100。                                   |
| `after_id`  | string  | No       | -       | カーソルとなるリソース ID。それより後のレコードを返します。`before_id` とは併用できません。 |
| `before_id` | string  | No       | -       | カーソルとなるリソース ID。それより前のレコードを返します。`after_id` とは併用できません。  |

## Example request

```bash theme={null}
curl -s -X GET 'https://api.qoder.com/api/v1/forward/resources?type=skill&limit=20' \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "id": "skill_xxx",
      "type": "skill",
      "owner_type": "user",
      "owner_id": "usr_xxx",
      "resource_spec": {
        "name": "customer-reply-skill",
        "description": "Customer reply policy skill",
        "type": "skill",
        "status": "active",
        "skill_type": "custom",
        "created_at": "2026-06-24T07:51:38.276624Z",
        "updated_at": "2026-06-24T07:51:38.276624Z",
        "metadata": {}
      }
    }
  ],
  "has_more": false,
  "first_id": "skill_xxx",
  "last_id": "skill_xxx"
}
```

## Response fields

| Field      | Type         | Description          |
| ---------- | ------------ | -------------------- |
| `data`     | array        | 現在のページのリソースオブジェクト。   |
| `has_more` | boolean      | さらにレコードが残っているかどうか。   |
| `first_id` | string\|null | このページの最初の項目のリソース ID。 |
| `last_id`  | string\|null | このページの最後の項目のリソース ID。 |

## Resource object fields

| Field           | Type   | Description                                    |
| --------------- | ------ | ---------------------------------------------- |
| `id`            | string | リソース ID。リソース ID と直接一致します。                      |
| `type`          | string | リソースタイプ。                                       |
| `owner_type`    | string | 所有権タイプ。このエンドポイントは `user` にフィルターされます。           |
| `owner_id`      | string | 現在の呼び出し元の所有者 ID。                               |
| `resource_spec` | object | フラット化された最新のリソースオブジェクト。フィールドは `type` によって異なります。 |

## Errors

| HTTP | Type                    | Trigger                                                 |
| ---- | ----------------------- | ------------------------------------------------------- |
| 400  | `invalid_request_error` | リソースの `type` が欠落しています。                                  |
| 400  | `invalid_request_error` | リソースの `type` がサポートされていません。                              |
| 400  | `invalid_request_error` | `limit` が範囲外、または `after_id` と `before_id` の両方が指定されています。 |
| 401  | `authentication_error`  | PAT が無効または期限切れです。                                       |

## Notes

* 参照できなくなったリソースはスキップされます。そのため `data` はローカルレジストリのレコード数より少なくなる場合があります。

## Related

<CardGroup cols={2}>
  <Card title="リソースを登録する" icon="plus" href="/cloud-agents/api/forward/resources/register" />

  <Card title="テンプレートを作成する" icon="file-plus" href="/cloud-agents/api/forward/templates/create" />
</CardGroup>
