This endpoint is in preview and may be modified or removed at any time.
To use this endpoint, add preview=true to the request query parameters.
Cancels a query. If the query is no longer running this is effectively a no-op.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:sql-queries-execute.
1
2
3
curl -X POST \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/sqlQueries/OikKBfqBaWRjOGQ3YTJkNzMtYjhiZi00ZDMzLTlkOWMtOGQzOW/cancel?preview=true"| Error Name | ||
|---|---|---|
Query | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | The provided token does not have permission to access the given query. | |
| Parameters | queryId | |
Query | Error Code | INVALID_ARGUMENT |
| Status Code | 400 | |
| Description | The query was canceled. | |
| Parameters | queryId | |
Query | Error Code | INTERNAL |
| Status Code | 500 | |
| Description | The query failed. | |
| Parameters | queryId, 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 | queryId | |
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 | |
Cancel | Error Code | PERMISSION_DENIED |
| Status Code | 403 | |
| Description | Could not cancel the SqlQuery. | |
| Parameters | sqlQueryId | |
See Errors for a general overview of errors in the platform.