/v1/databases/{uid}/data/rowsReturns 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
uidstringRequiredThe database's uid.
Query parameters
schemastringRequiredSchema of the table, as returned by List database tables. For MySQL this is the database (schema) name.
tablestringRequiredName of the table or view. Quoted for you, so pass it exactly as listed.
limitintegerRows 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
offsetintegerRows to skip. Defaults to 0. Negative or non-numeric values are treated as 0.
Default 0min 0
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
One page of rows.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
columnsarray of objectsRequiredResult columns, in order.
Show item attributesHide item attributes
namestringRequiredColumn name.
typestringRequiredType 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 | nullssRequiredResult rows. Each row is an array of cells in column order. Every value is a string; null is SQL NULL.
row_countintegerRequiredNumber of rows in rows.
truncatedbooleanRequiredtrue when more rows exist than were returned, because of the row cap, the page size or the response size cap.
commandstringPostgreSQL'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_msintegerRequiredTime taken to run the statement and read the result, in milliseconds.
Errors
| Status | Meaning |
|---|---|
400 | Validation 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. |
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The resource does not exist or you cannot access it. |
409 | The 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.