列表记忆条目

更新时间:
复制为 MD 格式

获取指定 Memory Store 下的所有记忆条目列表,支持分页。

请求头

头部

必选

说明

Authorization

Bearer

路径参数

参数

类型

必选

说明

memory_store_id

string

Memory Store ID(memstore_ 前缀)

查询参数

参数

类型

必选

说明

limit

integer

每页返回数量上限

after_id

string

游标分页:返回此 ID 之后的记录

before_id

string

游标分页:返回此 ID 之前的记录

完整分页规范详见 分页

示例请求

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

# 分页
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/memory_stores/memstore_xxx/memories?limit=20&after_id=mem_xxx" \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK

{
  "data": [
    {
      "id": "mem_019e3bb965a671fca51bde1cf8d87de0",
      "type": "memory",
      "store_id": "memstore_019e3bb93b7074f9a5130d39ddcca90f",
      "path": "test/note.md",
      "size": 11,
      "content_sha256": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c",
      "version": 1,
      "metadata": {},
      "created_at": "2026-05-18T15:34:26.494349Z",
      "updated_at": "2026-05-18T15:34:26.494349Z"
    }
  ],
  "first_id": "mem_019e3bb965a671fca51bde1cf8d87de0",
  "last_id": "mem_019e3bb965a671fca51bde1cf8d87de0",
  "has_more": false
}

响应字段

字段

类型

说明

data

array

MemoryEntry 对象数组(不含 content

first_id

string

当前页第一条记录 ID

last_id

string

当前页最后一条记录 ID

has_more

boolean

是否还有更多数据

列表中单条记录字段:

字段

类型

说明

id

string

唯一标识符

type

string

固定值 "memory"

store_id

string

所属 Store ID

path

string

相对路径

size

int64

内容大小(字节)

content_sha256

string

内容 SHA-256 哈希

version

int64

当前版本号

metadata

object

自定义元数据

created_at

string

创建时间

updated_at

string

最后更新时间

错误码

HTTP

type

触发条件

401

authentication_error

未提供或无效的认证令牌

404

not_found_error

指定的 Memory Store 不存在

注意事项

  • 列表接口不返回 content 字段,仅返回元数据

  • 如需获取内容,请使用获取记忆条目接口

  • 分页逻辑同其他列表接口:使用 limit + after_id

完整错误信封说明详见 错误参考