解除 Memory Store 与指定 Identity 和 Template 的挂载关系。
解除某个 Memory Store 与
Identity 级 Service Account Token 只能操作自己所属的 identity,操作其他 identity 返回
HTTP 200 OK
(identity, template) 的挂载关系。Store 本体及其中的 memory 条目不受影响,只是该 identity 之后创建的 Session 不再加载这个 Store。
系统默认库不可解绑,对其调用返回 409。
路径
DELETE /api/v1/forward/identities/{identity_id}/templates/{template_id}/memory_stores/{memory_store_id}
请求头
| 头部 | 必选 | 说明 |
|---|---|---|
Authorization | 是 | Bearer <PAT、admin SAT 或该 identity 的 SAT> |
403。
路径参数
| 参数 | 类型 | 必选 | 说明 |
|---|---|---|---|
identity_id | string | 是 | Identity ID(idn_...)。 |
template_id | string | 是 | Template ID(tmpl_...)。 |
memory_store_id | string | 是 | 要解绑的 Memory Store ID(memstore_...)。 |
示例请求
示例响应
HTTP 200 OK
响应字段解释
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 被解绑的 Memory Store ID。 |
type | string | 固定为 memory_store_binding_deleted。与删除 Store 的 memory_store_deleted 区分:本接口只解除挂载关系,Store 本体仍然存在。 |
deleted | boolean | 挂载关系是否已解除。 |
错误码
| HTTP | type | 触发条件 |
|---|---|---|
| 400 | invalid_request_error | 路径参数非法。 |
| 401 | authentication_error | 缺少或无效的认证令牌。 |
| 403 | permission_error | Identity 级 SAT 试图操作其他 identity。 |
| 404 | not_found_error | Identity、Template 不存在,或该 Store 没有挂载在此 (identity, template) 上。 |
| 409 | conflict_error | 目标为系统默认库,不允许解绑。 |
| 500/502/503 | api_error | Forward 或依赖服务失败。 |