Skip to main content
 print this page

Start a query execution

POST 

/queries

Submits a SQL statement for asynchronous execution against Athena or Redshift and returns the identifier of the new execution. A 200 means the query was accepted, not that it has finished: poll GET /queries/{queryid} for the state and GET /queries/{queryid}/results for the result set.

Be aware that two input errors on this operation are returned as HTTP 500 rather than 400, because the handler raises them as backend exceptions: an unsupported WorkGroup (DWH-1033) and selecting QueryTargetLocation "redshift" in an environment whose datalake is not Redshift (GE-1036).

Request

Responses

Query accepted for execution. The body carries the identifier to poll for status and results.

Response Headers
    Access-Control-Allow-Origin
    Access-Control-Allow-Methods
    Access-Control-Allow-Headers