Database Queries

Query database with SELECT (REST API)

Changed on

Query 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 functions with direct SQL

post/databases/{databaseName}/query/select

Request

  • Base URL: https://api.volcano.dev
  • URL: https://api.volcano.dev/databases/{databaseName}/query/select
  • Auth: HTTP bearer

Path parameters

databaseNamestring required

Database name (unique within project, lowercase letters, numbers, and underscores only)

Request body

tablestring required

Table name to query

selectstring[]

Columns to select (omit for *)

limitinteger

Maximum rows to return

offsetinteger

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

dataobject[]

Result rows

countinteger

Number of rows returned

Changes

    • ▲

      added the new path request parameter databaseName

    • ▲

      added the new required request property

    • ▲

      the request's body type changed from no type to object

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ○

      added the new optional request property

    • ○

      added the new optional request property

    • ○

      added the new optional request property

    • ○

      added the new optional request property

    • ○

      added the new optional request property

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property to the response with the status

    • ▲

      the request's body type changed from object to no type

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      the response's body type changed from object to no type for status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ▲

      removed the required property from the response with the status

    • ●

      deleted the path request parameter databaseName

    • ●

      removed the request property

    • ●

      removed the request property

    • ●

      removed the request property

    • ●

      removed the request property

    • ●

      removed the request property

    • ●

      removed the request property

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status

    • ●

      removed the optional property from the response with the status