按类型列出已注册的 Forward Resource。
HTTP 200 OK
请求头
| Header | 是否必填 | 说明 |
|---|---|---|
| Authorization | 是 | Bearer <PAT> |
查询参数
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
type | string | 是 | - | 资源类型:skill、file、vault 或 environment。 |
limit | integer | 否 | 20 | 分页大小,最大 100。 |
after_id | string | 否 | - | 资源 ID 游标,返回其后的记录,不能与 before_id 同用。 |
before_id | string | 否 | - | 资源 ID 游标,返回其前的记录,不能与 after_id 同用。 |
示例请求
示例响应
HTTP 200 OK
响应字段
字段 | 类型 | 说明 |
| array | 当前页的 Resource 对象。 |
| boolean | 是否还有更多记录。 |
| string|null | 当前页第一条 Resource ID。 |
| string|null | 当前页最后一条 Resource ID。 |
错误
| HTTP | Type | Code | 触发条件 |
|---|---|---|---|
| 400 | invalid_request_error | - | 缺少资源 type。 |
| 400 | invalid_request_error | - | 资源 type 不支持。 |
| 400 | invalid_request_error | - | limit 越界,或同时提供 after_id 和 before_id。 |
| 401 | authentication_error | authentication_required | PAT 无效或已过期。 |
Resource 对象字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | Resource ID,直接对齐资源 ID。 |
type | string | 资源类型:skill、file、vault、memory_store 或 environment。 |
owner_type | string | 归属类型;本接口按 owner_type=user 过滤。 |
owner_id | string | 当前调用方的资源拥有者 ID。 |
resource_spec | object | 资源的扁平实时对象,字段集随 type 变化。 |
备注
- 已失效或不可见的资源会被跳过,因此
data可能少于本地注册记录数。