Skip to main content
Mounts

解绑 Identity 上的 Memory Store

解除 Memory Store 与指定 Identity 和 Template 的挂载关系。

解除某个 Memory Store 与 (identity, template) 的挂载关系。解绑后,当前 (identity, template) 的新 Session 不再挂载该 Store,已有 Session 和 Store 本体及其中的 memory 条目不受影响。 解绑默认库还会停止当前 (identity, template) 的默认库自动创建;解绑显式挂载不改变默认库自动创建策略。

路径

DELETE /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores/{memory_store_id}

请求头

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

路径参数

参数类型必选说明
identity_idstring是Identity ID(idn_...)。
template_idstring是Template ID(tmpl_...)。
memory_store_idstring是要解绑的 Memory Store ID(memstore_...)。

示例请求

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

示例响应

HTTP 200 OK
{
  "id": "memstore_00mc7mukn7lkxr454tjd",
  "type": "memory_store_binding_deleted",
  "deleted": true
}

响应字段解释

字段类型说明
idstring被解绑的 Memory Store ID。
typestring固定为 memory_store_binding_deleted。与删除 Store 的 memory_store_deleted 区分:本接口只解除挂载关系,Store 本体仍然存在。
deletedboolean挂载关系是否已解除。

错误码

HTTPtype触发条件
400invalid_request_error路径参数非法。
401authentication_error缺少或无效的认证令牌。
403permission_errorIdentity 级 SAT 试图操作其他 identity。
404not_found_errorIdentity、Template 不存在,或该 Store 没有有效挂载在此 (identity, template) 上。
500/502/503api_errorForward 或依赖服务失败。