Execute a SQL generation#
This endpoint can be used to execute a SQL query and get the results in a json format.
Request this GET
endpoint to execute a SQL query and get the results in a json format:
api/v1/sql-generations/{sql_generation_id}/execute
Parameters
Name |
Type |
Description |
---|---|---|
sql_generation_id |
string |
The id of the SQL query you want to execute, |
max_rows |
integer |
the maximum number of rows to return, |
Responses
HTTP 201 code response
[
"string",
{
"result": [
{
}]
}
]
Request example
curl -X 'GET' \
'http://localhost/api/v1/sql-generations/65971ec8d274e27e2a360457/execute?max_rows=5' \
-H 'accept: application/json'
Response example
[
"[('91302', 13219.153846153846)]",
{
"result": [
{
"dh_zip_code": "91302",
"highest_rent": 13219.153846153846
}
]
}
]