跳转到主要内容
GET /api/v1/forward/resources 返回当前调用方拥有的资源。可见资源会附带实时 resource_spec

请求头

Header是否必填说明
AuthorizationBearer <PAT>

查询参数

参数类型是否必填默认值说明
typestring-资源类型:skillfilevaultenvironment
limitinteger20分页大小,最大 100。
after_idstring-资源 ID 游标,返回其后的记录,不能与 before_id 同用。
before_idstring-资源 ID 游标,返回其前的记录,不能与 after_id 同用。

示例请求

curl -s -X GET 'https://api.qoder.com/api/v1/forward/resources' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "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": {}
      }
    }
  ],
  "first_id": "skill_xxx",
  "last_id": "skill_xxx",
  "has_more": false
}

响应字段

字段类型说明
dataarray当前页的 Resource 对象。
has_moreboolean是否还有更多记录。
first_idstring | null当前页第一条 Resource ID。
last_idstring | null当前页最后一条 Resource ID。

Resource 对象字段

字段类型说明
idstringResource ID,直接对齐资源 ID。
typestring资源类型:skillfilevaultenvironment
owner_typestring归属类型;本接口按 owner_type=user 过滤。
owner_idstring当前调用方的资源拥有者 ID。
resource_specobject资源的扁平实时对象,字段集随 type 变化。

错误

HTTPTypeCode触发条件
400invalid_request_error-缺少资源 type
400invalid_request_error-资源 type 不支持。
400invalid_request_error-limit 越界,或同时提供 after_idbefore_id
401authentication_errorauthentication_requiredPAT 无效或已过期。

注意事项

  • 已失效或不可见的资源会被跳过,因此 data 可能少于本地注册记录数。

相关

注册 Resource

创建 Template