---
title: "Query database with SELECT (REST API)"
method: POST
path: "/databases/{databaseName}/query/select"
tags: ["Database Queries"]
---

# Query database with SELECT (REST API)

`POST /databases/{databaseName}/query/select`

## Request

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

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

## Path parameters

- `databaseName` string, required

## Request body

- DatabaseSelectRequest
  - `table` string, required: Table name to query
  - `select` string[]: Columns to select (omit for *)
  - `filters` DatabaseQueryFilter[]: WHERE conditions (combined with AND)
    - `column` string, required
    - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in', required: Filter operators: - eq: equals (=) - neq: not equals (<>) - gt: greater than (>) - gte: greater than or equal (>=) - lt: less than (<) - lte: less than or equal (<=) - like: pattern match (LIKE) - ilike: case-insensitive pattern match (ILIKE) - is: IS NULL / IS NOT NULL - in: IN array
    - `value` union, required
      - string, nullable
      - number
      - boolean
      - union[]: Array of values, for the `in` operator
        - union
          - string
          - number
          - boolean
  - `order` DatabaseQueryOrder[]: ORDER BY clauses
    - `column` string, required
    - `ascending` boolean
    - `nulls_first` boolean
  - `limit` integer: Maximum rows to return
  - `offset` integer: Number of rows to skip (for pagination)

## Response `200`

Query successful

- DatabaseQueryResult: Rows returned by a data API request. RLS-filtered unless the request was made with a service key.
  - `data` object[]: Result rows
  - `count` integer: Number of rows returned

## Other responses

- `400`: Invalid query
- `401`: Not authenticated
- `403`: Access denied
- `404`: Database not found
- `429`: The query was rejected by a billing-cycle allowance: either the owning platform user's bandwidth allowance (aggregate ingress + egress across owned projects) or their database-request allowance. Enforcement is eventual: queries are rejected until the allowance increases or the next anniversary cycle begins. The error message identifies the resource.

## Changes

- **2026-09-19** `3a6f365f3f35`: 9 breaking, 17 info
  - added the new path request parameter `databaseName`
  - added the new required request property `table`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `200`
  - …22 more
- **2026-08-27** `bb44e98aba2e`: 12 breaking, 14 warning
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `200`
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `401`
  - …22 more
- **2026-07-27** `bb52784e098a`: 5 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `403` status
  - added the optional property `code` to the response with the `404` status
  - …1 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/databases/:databaseName/query/select/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
