Skip to main content

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.read on :dbid.

Path parameters

NameTypeRequiredDefaultDescription
projectidstringYes-The project id.
dbidstringYes-The database id.
tblidstringYes-The table name.

Query parameters

NameTypeRequiredDefaultDescription
limitintegerNo100Rows to return. Capped at 1000.
offsetintegerNo0Rows to skip.
orderBystringNo-Column to sort by.
orderDirectionstringNo"ASC"ASC or DESC.
columnsstringNo-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.