Skip to main content
POST
/
api
/
v1
/
sql
Python
from samplehc import SampleHealthcare

client = SampleHealthcare(
    api_key="My API Key",
)
response = client.v1.sql_execute(
    query="query",
)
print(response)
{
  "rows": "<array>"
}

Body

application/json
query
string
required

The SQL query to execute.

params
any[]

An array of parameters to be used in the SQL query. Use placeholders like $1, $2, etc. in the query string.

arrayMode
boolean

If true, rows will be returned as arrays of values instead of objects. Defaults to false.

Response

The result of the SQL query execution. On success, returns 'rows'. If the query had issues but was processed, may return an 'error' object within a 200 response.

  • Option 1
  • Option 2

The result of the SQL query execution. On success, returns 'rows'. If the query had issues but was processed, may return an 'error' object within a 200 response.

rows
array
required

An array of results from the query. Each item is an object (default) or an array of values (if arrayMode is true).