Query database with SELECT (REST API)
Changed onQuery your database using a simple REST API - no SQL required!
Authentication: Requires auth user access token (from signup/signin)
Row-Level Security: Automatically enforced - you see only data you have access to
Use Cases:
- Query from browser/mobile apps
- Simple data retrieval
- Filtered searches with sorting and pagination
Note: For complex queries (JOINs, CTEs), use a function with direct SQL
Branch-targeted. Runs against the named branch instead of the parent database, using the branch's own credentials. The branch must be active and unexpired. Nothing about this request can reach the parent's data.
Request
- Base URLhttps://api.volcano.dev
- AuthHTTP bearer
Path parameters
Database name (unique within project, lowercase letters, numbers, and underscores only)
Branch name (unique within the parent database, lowercase letters, numbers, and underscores only)
Request body
Table name to query
Columns to select (omit for *)
WHERE conditions (combined with AND)
ORDER BY clauses
Maximum rows to return
Number of rows to skip (for pagination)
Example request
{
"table": "posts",
"select": [
"id",
"title",
"content",
"created_at"
],
"filters": [
{
"column": "status",
"operator": "eq",
"value": "published"
},
{
"column": "views",
"operator": "gt",
"value": 100
}
],
"order": [
{
"column": "created_at",
"ascending": false
}
],
"limit": 10
}Response
Query successful
Rows returned by a data API request. RLS-filtered unless the request was made with a service key.
Result rows
Number of rows returned
Changes
- breaking
added the new path request parameter
branchName - breaking
added the new path request parameter
databaseName - breaking
added the new required request property
table
27 more changes in this revision
- breaking