查询数据
GET/v1/rdb/rest/:table
查询表中的数据,支持复杂查询、关联查询、分页、排序等
Request
Path Parameters
table stringrequired
表名
Query Parameters
select string
选择字段,支持 * 或指定字段列表,支持关联查询如 class_id(grade,class_number)
limit integer
限制返回数量
offset integer
偏移量,用于分页
order string
排序字段,格式为 field.asc 或 field.desc
Header Parameters
Prefer string
偏好设置,如 count=exact
Responses
- 200
- 400
- 401
- 404
查询成功
Response Headers
Content-Range string
数据范围
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
object
[
{}
]
请求错误
- application/json
- Schema
- Example (from schema)
Schema
code string
错误码
details stringnullable
错误详情
hint stringnullable
错误提示
message string
错误信息
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
鉴权失败
- application/json
- Schema
- Example (from schema)
Schema
code string
错误码
details stringnullable
错误详情
hint stringnullable
错误提示
message string
错误信息
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
表不存在
- application/json
- Schema
- Example (from schema)
Schema
code string
错误码
details stringnullable
错误详情
hint stringnullable
错误提示
message string
错误信息
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
Loading...