Apps

Run one read-only query on an app's database

Runs one SELECT on the app's own database and returns at most 50 rows, to see what is in it while building or debugging. It only reads: anything that writes or changes the schema is refused, and the query runs as a subquery with the row limit outside it. Email addresses and phone numbers in the result are masked, long text is cut and binary values show only their size. Per-user tables can be read here (the project owns the data); every query is logged in the project's activity, without its SQL. At most 120 queries per hour per project.

post/apps/{id}/query

Request

  • Base URL: https://api.hypamoon.com/api/v1
  • URL: https://api.hypamoon.com/api/v1/apps/{id}/query
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.hypamoon.com/oauth/authorize, token URL https://api.hypamoon.com/oauth/token, scopes: sites:read)

Path parameters

idstring uuid required

The id of the app.

Request body

sqlstring required

One SELECT (or WITH ... SELECT). Nothing that writes or changes the schema.

limitinteger

Rows to return, 1 to 50 (default 20).

Response

The rows.

columnsstring[] required
rowsobject[] required
row_countinteger required
limitinteger required
truncatedboolean required

true when there were more rows than limit.

per_user_tablesstring[] required

Per-user tables this query read.

maskedstring required

Changes

No recorded changes to this operation across all 1 revision of this API.