列出 Memory Stores

更新时间:
复制为 MD 格式

获取当前账户下所有 Memory Store 的列表,支持分页。

请求头

头部

必选

说明

Authorization

Bearer

查询参数

参数

类型

必选

说明

limit

integer

每页返回数量上限

after_id

string

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

before_id

string

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

完整分页规范详见 分页

示例请求

# 获取全部
curl -X GET "https://api.qoder.com.cn/api/v1/cloud/memory_stores" \
  -H "Authorization: Bearer $QODER_PAT"

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

示例响应

HTTP 200 OK

{
  "data": [
    {
      "id": "memstore_019e3bb8d50674d9b082b73709c29c87",
      "type": "memory_store",
      "name": "doc-test-store",
      "description": "测试用",
      "status": "active",
      "entry_count": 0,
      "total_size": 0,
      "metadata": {},
      "created_at": "2026-05-18T15:33:49.449264Z",
      "updated_at": "2026-05-18T15:33:49.449264Z"
    }
  ],
  "first_id": "memstore_019e3bb8d50674d9b082b73709c29c87",
  "last_id": "memstore_019e3bb8d50674d9b082b73709c29c87",
  "has_more": false
}

响应字段

字段

类型

说明

data

array

MemoryStore 对象数组

first_id

string

当前页第一条记录 ID

last_id

string

当前页最后一条记录 ID

has_more

boolean

是否还有更多数据

分页用法

has_moretrue 时,使用 last_id 作为下一次请求的 after_id 参数继续获取数据:

curl -X GET "https://api.qoder.com.cn/api/v1/cloud/memory_stores?limit=10&after_id=memstore_last_id" \
  -H "Authorization: Bearer $QODER_PAT"

错误码

HTTP

type

触发条件

401

authentication_error

未提供或无效的认证令牌

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