Gets the results of a query. Results are returned in the serializationFormat specified at execute time
(defaulting to Apache Arrow if no format is provided).
This endpoint implements long polling and requests will time out after one minute. They can be safely retried while the query is still running.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:sql-queries-read.
stringThe unique identifier for a query. Note that query IDs are not URL-safe and must be URL-encoded when used in API endpoints.
1
2
3
curl \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/sqlQueries/OikKBfqBaWRjOGQ3YTJkNzMtYjhiZi00ZDMzLTlkOWMtOGQzOW/getResults"| Error Name | ||
|---|---|---|
Query | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The query was canceled. | |
| Parameters | | |
Query | Error Code | INTERNAL |
| Status Code | 500 | |
| Description | The query failed. | |
| Parameters | errorMessage | |
Query | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The query cannot be parsed. | |
| Parameters | errorMessage | |
Query | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The query is running. | |
| Parameters | | |
Read | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The provided token does not have permission to access the inputs to the query. | |
| Parameters | rids | |
Query | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The provided token does not have permission to access the given query. | |
| Parameters | | |
Get | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not getResults the SqlQuery. | |
| Parameters | | |
See Errors for a general overview of errors in the platform.