Run SQL against a SQL database
Changed onRuns 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.
Request
- Base URLhttps://api.telnyx.com/v2
- URLhttps://api.telnyx.com/v2/storage/sqldbs/{id}/actions/query
- AuthHTTP bearer
Path parameters
SQL database ID
Request body
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
- breaking
the
//response's property type changed fromintegertostring, and format fromint32to no format for status - breaking
the
//response's property type changed fromintegertostring, and format fromint32to no format for status - breaking
the
//response's property type changed fromintegertostring, and format fromint32to no format for status - breaking
the
//response's property type changed fromintegertostring, and format fromint32to no format for status - breaking
the
//response's property type changed fromintegertostring, and format fromint32to no format for status - breaking
the
//response's property type changed fromintegertostring, and format fromint32to no format for status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- breaking
- info
endpoint added
- info