OpenAPI 3.1.0raw.githubusercontent.com2026-08-191,3412,1385.0 MB

ec31f78cf002

sql databases

Run SQL against a SQL database

Runs SQL against the database and returns the resulting rows — empty for statements that return none, such as DDL. Bind positional ? placeholders with params rather than interpolating values into the SQL string.

post/storage/sqldbs/{id}/actions/query

Path parameters

idstring uuid required

SQL database ID

Request body

sqlstring required

The SQL to run. Use positional ? placeholders and supply the values in params rather than interpolating them into this string.

Example request

{
  "params": [
    "alice"
  ],
  "sql": "SELECT * FROM users WHERE name = ?"
}

Response

The SQL result

Example response

{
  "data": {
    "count": 1,
    "duration": 2.5,
    "meta": {
      "duration": 1.2,
      "rows_read": 3
    },
    "success": true
  }
}