归档记忆库。
前提
已完成 Endpoint 与鉴权配置,详见API 总览与认证。
接口
POST /memory_stores/{memory_store_id}/archive
路径参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
memory_store_id | 是 | string | 记忆库 ID |
请求示例
curl -X POST "$AGENTSTUDIO_URL/memory_stores/memstore_xxx/archive" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
响应
{
"id": "memstore_xxx",
"type": "memory_store",
"name": "项目知识库",
"description": "项目约定、决策记录与排查笔记",
"metadata": {
"team": "data"
},
"created_at": "2026-09-17T08:00:00Z",
"updated_at": "2026-09-17T09:00:00Z",
"archived_at": "2026-09-17T09:00:00Z"
}
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 记忆库 ID,格式 memstore_xxx |
type | string | 固定为 memory_store |
name | string | 记忆库名称,1-255 字符 |
description | string | 用途说明;未填写时为空字符串 |
metadata | object | 业务自定义键值对元数据 |
archived_at | string | null | 归档时间,未归档时省略或为 null |
created_at | string | 创建时间,ISO 8601 UTC |
updated_at | string | 最近更新时间,ISO 8601 UTC |
错误码
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 401 | InvalidApiKey | API Key 缺失、错误或失效 |
| 403 | permission_error | 身份或资源访问权限不足 |
| 404 | not_found_error | 资源不存在或不属于当前工作空间 |
该文章对您有帮助吗?