Query a site's database
Run SQL against a site's database.
Against production this reads only — SELECT, WITH, PRAGMA, EXPLAIN. A write here would leave no record of what ran, no restore point and nobody asked, so data changes go through db/migrate and shape changes go through the development database and a deploy.
The development database accepts anything: it holds no customer data, and experimenting on it is what it is for.
Request
- Base URL: https://api.crevio.co/v1
- URL: https://api.crevio.co/v1/sites/{id}/db/query
- Auth: API key in header Authorization
Path parameters
The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
Response
Query result
Changes
No recorded changes to this operation across all 2 revisions of this API.