Skip to main content
Memory Stores

列出 Identity 上的 Memory Store 挂载

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

列出指定 (identity, template) 上所有活跃的 Memory Store 挂载,包含系统在 Session 创建时自动配的默认库。 系统默认库始终排第一,是唯一 access=read_write 的挂载;其余显式挂载按挂载时间升序排列,全部为 read_only 挂载数量受上限约束(10 + 默认槽位),因此本接口不接受分页参数has_more 恒为 false

路径

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

请求头

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

路径参数

参数类型必选说明
identity_idstringIdentity ID(idn_...)。
template_idstringTemplate ID(tmpl_...)。

示例请求

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

示例响应

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
}

空列表响应

尚未创建过 Session 且没有任何显式挂载时返回空列表 —— 系统默认库是在首次创建 Session 时自动配的。
{
  "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恒为 false,挂载数量受上限约束。

错误码

HTTPtype触发条件
400invalid_request_error路径参数非法。
401authentication_error缺少或无效的认证令牌。
403permission_errorIdentity 级 SAT 试图查询其他 identity。
404not_found_errorIdentity 或 Template 不存在或不可见。
500/502/503api_errorForward 或依赖服务失败。