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 will no longer display 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: OAuth sessionId
- 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: OAuth 00DR00000000nd2aAQ8AQORpU.gf72HWKXAOkAcjOhYvBfvXiqgkMcERVkxSauharjcilr8BxJRjou
3E5mopL2TvHflPMtRd4.FFl63Yuq5pmhPaa1" \
4--header "Content-Type: " \
5"https://instance.salesforce.com/services/data/v46.0/jobs/query/750R0000000zxnaIAA"The response status is
1204 No Content