Skip to main content
Mounts

列出 Identity 上的 Memory Store 挂载

列出指定 Identity 和 Template 上的 Memory Store 挂载。

分页列出指定 (identity, template) 上活跃的 Memory Store 挂载,包含已有的系统默认库。 系统默认库始终排第一;其余显式挂载按挂载时间、Store ID 升序排列,同一 Store 只返回一次。access 返回各挂载的当前权限。 未传分页参数时默认返回前 20 条;通过 has_more 和游标继续翻页。

路径

GET /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores

请求头

头部必选说明
Authorization是Bearer <PAT、admin SAT 或该 identity 的 SAT>
Identity 级 Service Account Token 只能查询自己所属的 identity,查询其他 identity 返回 403。

路径参数

参数类型必选说明
identity_idstring是Identity ID(idn_...)。
template_idstring是Template ID(tmpl_...)。

查询参数

参数类型必选说明
limitinteger否每页返回数量上限,1..100,默认 20。
after_idstring否向后翻页游标,使用上一页的 last_id(Store ID)。
before_idstring否向前翻页游标,使用当前页的 first_id(Store ID);与 after_id 互斥。

示例请求

curl -X GET "https://api.qoder.com.cn/api/v1/forward/identities/idn_63ee28747a35cff93771c491/templates/tmpl_eb3377fb74ad413e17b3d755/memory_stores" \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "memory_store_id": "memstore_00mc7mtpughs0h0b7vll",
      "identity_id": "idn_63ee28747a35cff93771c491",
      "template_id": "tmpl_eb3377fb74ad413e17b3d755",
      "access": "read_write",
      "system_managed": true,
      "name": "System Default Memory",
      "status": "active",
      "entry_count": 3,
      "created_at": "2026-08-14T09:50:14Z"
    },
    {
      "memory_store_id": "memstore_00mc7mukn7lkxr454tjd",
      "identity_id": "idn_63ee28747a35cff93771c491",
      "template_id": "tmpl_eb3377fb74ad413e17b3d755",
      "access": "read_only",
      "system_managed": false,
      "name": "team-a",
      "status": "active",
      "entry_count": 12,
      "created_at": "2026-08-14T10:00:00Z"
    }
  ],
  "first_id": "memstore_00mc7mtpughs0h0b7vll",
  "last_id": "memstore_00mc7mukn7lkxr454tjd",
  "has_more": false
}

空列表响应

没有有效挂载时返回空列表。
{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}

响应字段解释

字段类型说明
dataarrayMemory Store 挂载对象数组。
first_idstring/null当前页第一条挂载的 memory_store_id。
last_idstring/null当前页最后一条挂载的 memory_store_id。
has_moreboolean指定翻页方向是否仍有更多记录。

错误码

HTTPtype触发条件
400invalid_request_error路径或分页参数非法,或同时提供 after_id 和 before_id。
401authentication_error缺少或无效的认证令牌。
403permission_errorIdentity 级 SAT 试图查询其他 identity。
404not_found_errorIdentity 或 Template 不存在或不可见,或游标不属于当前作用域的有效挂载。
500/502/503api_errorForward 或依赖服务失败。