Cancel Spark Job (V2)
This operation submits a cancellation request for a Spark job in a specified project.
The base URL for this API is in the following format:
https://api.cloud.zilliz.com
The endpoints on the control plane currently supports up to 20 requests per second per user per endpoint.
export BASE_URL="https://api.cloud.zilliz.com"
The authentication token should be an API key with appropriate privileges.
The project ID.
The Spark job ID.
export TOKEN="YOUR_API_KEY"
export projectId="proj-xxxxxxxxxxxxxxxxxxx"
export jobId="job-xxxxxxxxxxxxxxxxxx"
curl --request POST \
--url "${BASE_URL}/v2/projects/${projectId}/jobs/${jobId}/cancel" \
--header "Authorization: Bearer ${TOKEN}" \
--header "Request-Timeout: 5" \
--header "Content-Type: application/json"
The cancellation request was accepted.
Response code.
Response payload that contains the Spark job after the cancel request.
The job ID.
The project ID the job belongs to.
The job type.
The job description.
The job status.
The cloud region ID.
The cluster ID.
The output artifact produced by the job.
The volume name the artifact is stored in.
The path of the artifact within the volume.
Details of a backfill job.
The database name.
The collection name.
A reference to job input or output data.
The data reference type.
The volume name.
The data path within the volume.
The data format.
The target fields.
Source-to-target column mapping.
The backfill mode.
The resource size.
The reason a job failed.
The error code.
The error message.
Whether the job can be retried.
The precheck report for a backfill job.
Whether the precheck passed.
The database name.
The collection name.
The input description.
The target fields.
Source-to-target column mapping.
The required source columns.
The precheck errors.
A single precheck error.
The error code.
The source column.
The target field.
The expected type.
The actual type.
The error message.
The number of checked rows.
Creation time (ISO 8601).
Submission time (ISO 8601).
Start time (ISO 8601).
Finish time (ISO 8601).
The duration in seconds.
Returns an error message.
Response code.
Error message.
{
"code": 0,
"data": {
"jobId": "job-xxxxxxxxxxxxxxxxxx",
"sparkInstanceId": "sp-xxxxxxxxxxxxxxxxxx",
"type": "SPARK",
"jobName": "daily-vector-etl",
"status": "CANCELED",
"regionId": "aws-us-west-2",
"clusterId": "in01-xxxxxxxxxxxxxxx",
"mainClass": "com.zilliz.example.Main",
"createdAt": "2026-05-20T10:00:00Z",
"startedAt": "2026-05-20T10:01:00Z",
"finishedAt": "2026-05-20T10:06:00Z",
"durationSeconds": 300,
"sparkApplicationName": "spark-batch-sp-xxxxxxxxxxxxxxxxxx",
"sparkNamespace": "spark-sp-xxxxxxxxxxxxxxxxxx",
"sparkHistoryUrl": "https://spark-history.example.com",
"sparkApplicationId": "spark-batch-sp-xxxxxxxxxxxxxxxxxx-0",
"sparkHistoryAppUrl": "https://spark-history.example.com/history/spark-batch-sp-xxxxxxxxxxxxxxxxxx-0/jobs/",
"artifact": {
"volumeId": "stg-xxxxxxxxxxxxxxxxxxx",
"path": "/jars/example-job.jar",
"artifactUri": "volume://my-volume/jars/example-job.jar"
},
"applicationType": "Java",
"arguments": [
"--collection",
"medium_articles"
],
"resource": {
"driverCores": 2,
"driverMemory": "8g",
"executorCores": 2,
"executorMemory": "8g",
"minExecutors": 1,
"maxExecutors": 10
},
"sparkConf": {
"spark.sql.shuffle.partitions": "200"
},
"error": null,
"submittedAt": "2026-05-20T10:00:30Z"
}
}