Skip to main content
Memory Stores

解绑 Identity 上的 Memory Store

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

解除某个 Memory Store 与 (identity, template) 的挂载关系。Store 本体及其中的 memory 条目不受影响,只是该 identity 之后创建的 Session 不再加载这个 Store。 系统默认库不可解绑,对其调用返回 409

路径

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

请求头

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

路径参数

参数类型必选说明
identity_idstringIdentity ID(idn_...)。
template_idstringTemplate ID(tmpl_...)。
memory_store_idstring要解绑的 Memory Store ID(memstore_...)。

示例请求

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

示例响应

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) 上。
409conflict_error目标为系统默认库,不允许解绑。
500/502/503api_errorForward 或依赖服务失败。