Delete a Query Job
Deletes a query job. When a job is deleted, job data stored by
Salesforce is deleted and job metadata information is removed. The job no longer displays in
the Bulk Data Load Jobs page in Salesforce.
Syntax
URI: /services/data/vXX.X/jobs/query/queryJobId
Available since release:
This resource is available in API version 47.0 and later.
Formats: None
HTTP methods: DELETE
Authentication: Authorization: Bearer token
Request parameters:
| Parameter | Description | Required or Optional |
|---|---|---|
| queryJobId | The ID of the query job to be deleted. | Required |
Response Body
If the method is successful, the status code is 204 (No Content) and there is no response body.
Response Body - For an Unsuccessful Request
If the request fails, the server returns a 400 (Bad Request) status, and the request body shows details of the error. For example:
1HTTP/1.1 400 Bad Request
2[{
3 "errorCode": "API_ERROR",
4 "message": "Error encountered when deleting the job because the job is not terminated"
5}]Example
This example deletes the job with ID 750R0000000zxnaIAA.
1curl --include --request DELETE \
2--header "Authorization: Bearer token \
3--header "Content-Type: " \
4https://instance.salesforce.com/services/data/vXX.X/jobs/query/750R0000000zxnaIAAThe response status is
1204 No Content