Skip to main content
Memory Stores

列出 Memory

列出指定 Memory Store 中的 Memory 条目。

列出指定 Memory Store 中的 memory 条目,支持路径前缀过滤和游标翻页。 列表不返回 content 字段,需要调用 查询 Memory 才能读取内容。

路径

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

请求头

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

路径参数

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

查询参数

参数类型必选说明
limitinteger每页返回数量上限,1..100,默认 20。
before_idstring向前翻页游标,与 after_id 互斥。
after_idstring向后翻页游标,与 before_id 互斥。
path_prefixstringpath 前缀过滤。这是纯字符串前缀匹配,不是目录语义 —— path_prefix=a/b 也会命中 a/bc.md

示例请求

# 基本列表
curl -X GET "https://api.qoder.com/api/v1/forward/memory_stores/memstore_00mc7mukn7lkxr454tjd/memories" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

# 按路径前缀过滤
curl -X GET "https://api.qoder.com/api/v1/forward/memory_stores/memstore_00mc7mukn7lkxr454tjd/memories?path_prefix=decisions/" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "id": "mem_00mc7mvag5u68kkfvxhy",
      "type": "memory",
      "memory_store_id": "memstore_00mc7mukn7lkxr454tjd",
      "path": "decisions/arch-choice.md",
      "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"
    }
  ],
  "first_id": "mem_00mc7mvag5u68kkfvxhy",
  "last_id": "mem_00mc7mvag5u68kkfvxhy",
  "has_more": false
}

空列表响应

{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}

响应字段解释

字段类型说明
dataarrayMemory 对象数组,不含 content
first_idstring/null当前页第一条记录 ID。
last_idstring/null当前页最后一条记录 ID。
has_moreboolean是否还有更多记录。

错误码

HTTPtype触发条件
400invalid_request_errorlimit 越界,或 after_id/before_id 同时传入。
401authentication_error缺少或无效的认证令牌。
403permission_error当前调用方无权访问该资源。
404not_found_errorMemory Store 不存在或跨用户不可见。
500/502/503api_errorForward 或依赖服务失败。