查询多条数据
POSThttps://your-envId.api.tcloudbasegateway.com/v1/model/prod/:modelName/list
Request
Path Parameters
modelName stringrequired
数据模型标识
- application/json
Body
filter object
select object
pageSize 分页大小,建议指定,如需设置为其它值,需要和pageNumber配合使用,两者同时指定才会生效。默认10 (integer)
pageNumber 分页数目。默认1 (integer)
getCount 获取 filter 命中条件的查询条数。默认false (boolean)
orderBy undefined[]
Responses
- 200
成功
- application/json
- Schema
- Example (from schema)
Schema
- FindManyResponse
- ErrorResponse
oneOf
data object
requestId 请求唯一id (string)
code 错误码 (string)
message 错误信息 (string)
requestId 请求唯一id (string)
{}
Authorization: http
name: JWTAuthtype: httpscheme: bearerdescription: 环境 ID 所对应的 token,使用登录鉴权(v2)获取
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://your-envId.api.tcloudbasegateway.com/v1/model/prod/:modelName/list' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"filter": {
"where": {
"_id": {
"$eq": "foobar"
}
}
},
"select": {
"_id": true,
"owner": true
},
"pageSize": 10,
"pageNumber": 1,
"getCount": false,
"orderBy": [
{
"_id": "asc"
},
{
"owner": "desc"
}
]
}'
ResponseClear