跳转到主要内容
POST /v1/memory_stores/{memory_store_id}/archive 归档一个 active 状态的 Memory Store,并返回更新后的 Memory Store 对象

请求头

头部必选说明
AuthorizationBearer <PAT>

路径参数

参数类型必选说明
memory_store_idstringMemory Store ID,前缀为 memstore_

示例请求

curl -X POST "https://api.qoder.com/api/v1/cloud/memory_stores/memstore_019e3bb8d50674d9b082b73709c29c87/archive" \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "id": "memstore_019e3bb8d50674d9b082b73709c29c87",
  "type": "memory_store",
  "name": "doc-test-store",
  "description": "测试用",
  "status": "archived",
  "entry_count": 0,
  "total_size": 0,
  "metadata": {},
  "archived_at": "2026-05-18T15:34:00.007987Z",
  "created_at": "2026-05-18T15:33:49.449264Z",
  "updated_at": "2026-05-18T15:34:00.007987Z"
}

响应字段

字段类型说明
idstringMemory Store ID,前缀为 memstore_
typestring固定值 "memory_store"
namestringStore 名称
descriptionstringStore 描述
statusstring操作成功后为 archived
entry_countintegeractive memory entry 数量
total_sizeintegeractive memory entry 总大小,单位 byte
metadataMetadata 对象自定义元数据
archived_atstringUTC 归档时间
created_atstringUTC 创建时间
updated_atstringUTC 最后更新时间

注意事项

不需要请求体。归档后 Store 仍可读取,但不能继续创建或更新 entry。

错误码

HTTPtype触发条件
401authentication_error缺少或无效的认证令牌
404not_found_error指定 ID 的 Memory Store 不存在
409conflict_errorMemory Store 已归档
完整错误信封说明详见 错误参考

相关

Memory Stores

让 Agent 拥有跨 Session 的持久记忆。