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.
You can only delete a job if its state is JobComplete, Aborted, or Failed.
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:
This example deletes the job with ID 750R0000000zxnaIAA.
The response status is