Cancel execution¶
Stops SQL queries that are still running for the current identity. After the call is successful, use query execution status to confirm the status of the query.
HTTP
POST $CLOUDSIGMA_API_BASE/query/kill
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
Request¶
Shell
curl -X POST "$CLOUDSIGMA_API_BASE/query/kill" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d "{\"query_id\":\"$QUERY_ID\"}"
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
query_id | string | Required | The query ID to cancel. |
Successful response¶
A successful response indicates that the cancellation request has been completed and the query record is marked as killed. Use query execution status to read records.
The response fields are as follows.
JSON
{
"code": 200,
"data": null
}
| Field | Type | Description |
|---|---|---|
code | integer | 200 on success. |
data | null | This operation does not return data. |
Error response¶
JSON
{"code": 404, "message": "SQL 查询不存在"}
| Field | Type | Description |
|---|---|---|
code | string | Error code. |
msg | string | Readable error message. |
data | null | `null` in an error response. |
Follow-up operations¶
Query execution status again to confirm that execution has stopped.
Last updated on