Skip to content

模型数据 API

查询记录列表

GET /api/v1/models/{modelName}/records

查询参数:

参数类型说明
pagenumber页码,默认 1
pageSizenumber每页条数,默认 20,最大 100
filterJSON筛选条件,见下方说明
sortstring排序字段,如 -createdAt(负号表示降序)

筛选条件示例:

json
{ "status": "active", "amount": { "$gte": 1000 } }

示例请求:

bash
curl -H "Authorization: Bearer your-token" \
  "https://your-domain/api/v1/models/customers/records?pageSize=10"

创建记录

POST /api/v1/models/{modelName}/records
Content-Type: application/json

{
  "name": "新客户",
  "status": "active",
  "amount": 5000
}

更新记录

PATCH /api/v1/models/{modelName}/records/{id}
Content-Type: application/json

{
  "status": "closed"
}

删除记录

DELETE /api/v1/models/{modelName}/records/{id}

基于 MIT 许可发布