读取指定历史版本。
前提
已完成 Endpoint 与鉴权配置,详见API 总览与认证。
接口
GET /memory_stores/{memory_store_id}/memory_versions/{memory_version_id}
路径参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
memory_store_id | 是 | string | 记忆库 ID |
memory_version_id | 是 | string | 版本 ID |
请求示例
响应
响应字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 版本 ID,格式 memver_xxx |
type | string | 固定为 memory_version |
memory_store_id | string | 所属记忆库 ID |
memory_id | string | 对应的记忆 ID |
operation | created / modified / deleted | 产生该版本的操作类型 |
path | string | 该版本快照中的路径 |
content | string | 该版本正文;已擦除时不含此字段 |
content_sha256 | string | 该版本正文的 SHA256 哈希 |
content_size_bytes | integer | 该版本正文的 UTF-8 字节数 |
redacted_at | string | null | 正文被擦除的时间;未擦除时省略或为 null |
created_at | string | 版本产生时间,ISO 8601 UTC |
错误码
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 401 | InvalidApiKey | API Key 缺失、错误或失效 |
| 403 | permission_error | 身份或资源访问权限不足 |
| 404 | not_found_error | 资源不存在或不属于当前工作空间 |