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

ParameterTypeRequiredDescription
query_idstringRequiredThe 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
}
FieldTypeDescription
codeinteger200 on success.
datanullThis operation does not return data.

Error response

JSON
{"code": 404, "message": "SQL 查询不存在"}
FieldTypeDescription
codestringError code.
msgstringReadable error message.
datanull`null` in an error response.

Follow-up operations

Query execution status again to confirm that execution has stopped.

Last updated on