将一个活跃的 Memory Store 归档,归档后状态变为 archived。
请求头
头部 | 必选 | 说明 |
| 是 |
|
| 是 |
|
路径参数
参数 | 类型 | 必选 | 说明 |
| string | 是 | Memory Store ID( |
示例请求
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/memory_stores/memstore_019e3bb8d50674d9b082b73709c29c87/archive" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json"示例响应
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"
}响应字段
字段 | 类型 | 说明 |
| string | 唯一标识符 |
| string | 固定值 |
| string | 存储名称 |
| string | 存储描述 |
| string | 归档后为 |
| int64 | 记忆条目数量 |
| int64 | 总存储大小(字节) |
| object | 自定义元数据 |
| string | 归档时间(ISO 8601) |
| string | 创建时间(ISO 8601) |
| string | 最后更新时间(ISO 8601) |
错误码
HTTP | type | 触发条件 |
401 |
| 未提供或无效的认证令牌 |
404 |
| 指定 ID 的 Memory Store 不存在 |
注意事项
归档操作会设置
archived_at时间戳归档后
status变为"archived"归档后仍可通过 DELETE 接口彻底删除
不需要请求体
完整错误信封说明详见 错误参考。
该文章对您有帮助吗?