Skip to main content
Memory Stores

获取记忆条目

根据 ID 获取单个记忆条目的完整内容。

路径参数

参数类型是否必需说明
memory_store_idstringMemory Store ID,带 memstore_ 前缀
memory_idstring记忆条目 ID,带 mem_ 前缀

请求头

Header是否必需说明
AuthorizationBearer $QODER_PAT

请求示例

curl -X GET "https://api.qoder.com.cn/api/v1/cloud/memory_stores/memstore_xxx/memories/mem_xxx" \
  -H "Authorization: Bearer $QODER_PAT"

返回示例

HTTP 200 OK 返回完整的 MemoryEntry 对象(包含 content)。
{
  "id": "mem_019e3bb965a671fca51bde1cf8d87de0",
  "type": "memory",
  "store_id": "memstore_019e3bb93b7074f9a5130d39ddcca90f",
  "path": "test/note.md",
  "content": "Hello world",
  "size": 11,
  "content_sha256": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c",
  "version": 1,
  "metadata": {},
  "created_at": "2026-05-18T15:34:26.494349Z",
  "updated_at": "2026-05-18T15:34:26.494349Z"
}

返回参数

字段类型说明
idstring唯一标识
typestring固定为 "memory"
store_idstring所属 Memory Store 的 ID
pathstring相对路径
contentstring完整记忆内容
sizeint64内容大小(字节)
content_sha256string内容 SHA-256 哈希
versionint64当前版本号
metadataobject自定义元数据
created_atstring创建时间(ISO 8601)
updated_atstring最后更新时间(ISO 8601)

错误码

HTTP类型触发条件
401TOKEN_INVALID缺失或无效的鉴权 Token
404not_found_errorMemory Store 或记忆条目不存在

说明

  • 该接口返回 content 字段(列表接口不会返回)。
  • 返回的是最新版本的完整内容。
完整错误信封见 错误码