Query Records
GET/v1/rdb/rest/:table
Query data in table, supports complex queries, join queries, pagination, sorting, etc.
Request
Path Parameters
table stringrequired
Table name
Query Parameters
select string
Select fields, supports * or specified field list, supports join queries like class_id(grade,class_number)
limit integer
Limit return count
offset integer
Offset, used for pagination
order string
Sort field, format is field.asc or field.desc
Header Parameters
Prefer string
Preference setting, such as count=exact
Responses
- 200
- 400
- 401
- 404
Query successful
Response Headers
Content-Range string
Data range
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
object
[
{}
]
Request error
- application/json
- Schema
- Example (from schema)
Schema
code string
Error code
details stringnullable
Error details
hint stringnullable
Error hint
message string
Error message
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
Authentication failed
- application/json
- Schema
- Example (from schema)
Schema
code string
Error code
details stringnullable
Error details
hint stringnullable
Error hint
message string
Error message
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
Table does not exist
- application/json
- Schema
- Example (from schema)
Schema
code string
Error code
details stringnullable
Error details
hint stringnullable
Error hint
message string
Error message
{
"code": "PGRST106",
"details": null,
"hint": "Only the following schemas are exposed: public",
"message": "Invalid schema: undefined"
}
Loading...