Execute SQL query

Execute a SELECT query on the PostgreSQL database. Only SELECT queries are allowed for security.

post/api/v1/database/query

Request

  • Base URL: https://localhost:3000
  • URL: https://localhost:3000/api/v1/database/query
  • Auth: OAuth 2 (authorization code, authorization URL /oauth/authorize, token URL /oauth/token)

Request body

querystring required

SQL SELECT query to execute

Example request

{
  "query": "SELECT * FROM users LIMIT 10"
}

Response

Query results

userstring
querystring

The SQL query executed

resultsobject[]

Array of result rows

countinteger

Number of rows returned

Changes

No recorded changes to this operation across all 1 revision of this API.