Managed Databases

Run one statement against the database and get the result: SQL for PostgreSQL, MySQL, and ClickHouse, one command for Valkey, or one of these commands for Kafka: TOPICS, DESCRIBE <topic>, CREATE-TOPIC <name> [partitions], DELETE-TOPIC <name>, PRODUCE <topic> <message>, CONSUME <topic> [n], GROUPS. TOPICS returns each topic's partitions, copies, retention, messages kept, readers, and lag.

  • Runs as the admin user, read-only unless you set read_only: false. A read-only run refuses writes.
  • Returns at most max_rows rows (default 1,000, ceiling 5,000); truncated is true when more rows existed.
  • A statement is stopped after 15 seconds.

Each row carries its values as strings in cells, with nulls[i] set when value i is SQL NULL.

post/api/v1/databases/{database_id}/console

Request

  • Base URL
    https://api.rafftechnologies.com
  • URL
    https://api.rafftechnologies.com/api/v1/databases/{database_id}/console
  • Auth
    API key in header X-API-Key

Path parameters

database_idstring required

Database ID (UUID) or short id (the database_id field, e.g. a1b2c3d4)

Request body

statementstring required

One SQL statement, or one Valkey command

read_onlyboolean

Refuse writes. Set false to run statements that change data or schema.

max_rowsinteger

Most rows to return (ceiling 5,000)

Example request

{
  "statement": "SELECT id, email FROM users LIMIT 10;"
}

Response

Query result

successboolean
columnsstring[]
rows_affectedinteger

Rows changed by a write

commandstring

Engine command tag, for example SELECT 10 or INSERT 0 1

noticesstring[]
truncatedboolean

More rows existed than max_rows

duration_msnumber

Changes