Skip to content

Browse table rows

GET/v1/databases/{uid}/data/rows

Returns one page of rows from a PostgreSQL or MySQL table or view, as SELECT * FROM <schema>.<table> LIMIT <limit> OFFSET <offset> in a read-only transaction. Rows have no defined order.

truncated is true when more rows exist after this page (or when the response hit the 4 MiB size cap). The response shape and limits are the same as for Run a read-only query.

The database must be ready. Requires the secrets read permission (owner, admin or developer role).

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The database's uid.

Query parameters

schemastringRequired

Schema of the table, as returned by List database tables. For MySQL this is the database (schema) name.

tablestringRequired

Name of the table or view. Quoted for you, so pass it exactly as listed.

limitinteger

Rows per page. Defaults to 50. Values above 200 are capped at 200. Zero, negative or non-numeric values use the default.

Default 50min 1 · max 200

offsetinteger

Rows to skip. Defaults to 0. Negative or non-numeric values are treated as 0.

Default 0min 0

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

One page of rows.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
columnsarray of objectsRequired

Result columns, in order.

Show item attributes
namestringRequired

Column name.

typestringRequired

Type name reported by the engine (for example int4 in PostgreSQL or varchar in MySQL). Empty string for Redis and for unknown types.

rowsarray of array of string | nullssRequired

Result rows. Each row is an array of cells in column order. Every value is a string; null is SQL NULL.

row_countintegerRequired

Number of rows in rows.

truncatedbooleanRequired

true when more rows exist than were returned, because of the row cap, the page size or the response size cap.

commandstring

PostgreSQL's command tag (for example SELECT 2 or EXPLAIN). For MySQL, SELECT <n> when the statement returned columns. For Redis SCAN-family commands, next cursor <n>. Omitted when the result was truncated and otherwise when there is none.

duration_msintegerRequired

Time taken to run the statement and read the result, in milliseconds.

Errors

StatusMeaning
400Validation or query failed. Possible messages: schema and table are required, invalid table name, this database has no tables, browse its keys instead, or the database's own error, such as a missing table.
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404The resource does not exist or you cannot access it.
409The data browser cannot run right now. Possible messages: the database must be ready to browse its data, the data viewer is busy, try again in a moment, and couldn't reach the database, check that it's running and try again.

Errors use the standard error format.