Read rows
GET /projects/:projectid/databases/:dbid/tables/:tblid/rows
Page through a table without writing SQL.
Selects from the table with optional column projection, ordering and paging. This is the read path that needs only the read permission — anything more expressive needs Run SQL.
Authentication
- Project API key: The credential for everything external. Created in Project Settings, bound to one project, and limited to the scopes it was granted. Format:
proj.<keyId>.<secret>. - Required permission:
databases.readon :dbid.
Path parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
projectid | string | Yes | - | The project id. |
dbid | string | Yes | - | The database id. |
tblid | string | Yes | - | The table name. |
Query parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 100 | Rows to return. Capped at 1000. |
offset | integer | No | 0 | Rows to skip. |
orderBy | string | No | - | Column to sort by. |
orderDirection | string | No | "ASC" | ASC or DESC. |
columns | string | No | - | Comma separated column names. Omit for every column. |
Example request
curl -X GET \
-H "Authorization: proj.KEY_ID.SECRET" \
{{BASE_URL}}/projects/{{PROJECT_ID}}/databases/DATABASE_ID/tables/orders/rows?columns=intellectible_id%2Ctotal
Responses
200
The rows, with the paging that produced them.
{
"rows": [
{
"intellectible_id": "r_91ba",
"total": 42.5
}
],
"limit": 100,
"offset": 0
}
400
A column or order-by name is not a valid identifier.
Notes
- Every identifier you pass is interpolated into SQL, so table, column and order-by names must be lower snake case. Anything else is rejected with a 400 rather than escaped.