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

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

Response

The SQL result

Example response

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

Changes

Changed in 2 of the 99 revisions of this API.6613

  • a6a61a29ecdd6612See the full diff
    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ▲

      the // response's property type changed from string to integer, and format from no format to int32 for status

      response-property-type-changed

    • ●

      removed the optional property /// from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property /// from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property /// from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property /// from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property /// from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property /// from the response with the status

      response-optional-property-removed

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    • ○

      the response property // became required for the status

      response-property-became-required

    This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      endpoint added

      endpoint-added

    This revision also has 64 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 99 revisions, 1 has no diff computed.