Skip to main content
Memory Stores

查询 Memory

查询指定的 Memory 条目。

根据 Memory ID 获取单条 memory,响应包含 content 字段

路径

GET /api/v1/forward/memory_stores/{memory_store_id}/memories/{memory_id}

请求头

头部必选说明
AuthorizationBearer <PAT 或 admin SAT>

路径参数

参数类型必选说明
memory_store_idstringMemory Store ID(memstore_...)。
memory_idstringMemory ID(mem_...)。

示例请求

curl -X GET "https://api.qoder.com/api/v1/forward/memory_stores/memstore_00mc7mukn7lkxr454tjd/memories/mem_00mc7mvag5u68kkfvxhy" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

HTTP 200 OK
{
  "id": "mem_00mc7mvag5u68kkfvxhy",
  "type": "memory",
  "memory_store_id": "memstore_00mc7mukn7lkxr454tjd",
  "path": "decisions/arch-choice.md",
  "content": "# 架构决策\n\n选择微服务架构。",
  "content_size_bytes": 99,
  "content_sha256": "1712de0d497a5aeef2beeccf4fbb7d5a16944975438d0c25447b9c1fba13099a",
  "metadata": {"owner": "backend-team"},
  "created_at": "2026-08-14T10:00:00Z",
  "updated_at": "2026-08-14T10:00:00Z"
}

响应字段解释

返回 Memory 对象,包含 content

注意事项

已归档的 Memory Store 仍然允许读取 memory。

错误码

HTTPtype触发条件
400invalid_request_error路径参数非法。
401authentication_error缺少或无效的认证令牌。
403permission_error当前调用方无权访问该资源。
404not_found_errorMemory Store 或 Memory 不存在,或跨用户不可见。
500/502/503api_errorForward 或依赖服务失败。