Abort a Query Job
Aborts a query job.
-
To abort a job, you must be the job’s creator or have the Manage Data Integrations permission.
-
You can only abort jobs that are in the following states:
UploadCompleteInProgress
URI: /services/data/vXX.X/jobs/query/queryJobId
Available since release:
This resource is available in API version 47.0 and later.
Formats: JSON
HTTP methods: PATCH
Authentication: Authorization: Bearer token
Request body
The request body must be the following:
Request parameters:
| Parameter | Description | Required or Optional |
|---|---|---|
queryJobId | The ID of the query job to be deleted. | Required |
Response Body
If the request is successful, the status code is 200 (OK). The response body has the state Aborted. For example:
Response Parameters:
| Parameter | Description |
|---|---|
id | The unique ID for this job. |
operation | The type of query. Possible values are:
|
object | The object type being queried. |
createdById | The ID of the user who created the job. |
createdDate | The UTC date and time when the job was created. |
systemModstamp | The UTC date and time when the API last updated the job information. |
state | The current state of processing for the job. Possible values are:
|
concurrencyMode | Reserved for future use. How the request is processed. Currently only parallel mode is supported. (When other modes are added, the API chooses the mode automatically. The mode isn’t user configurable.) |
contentType | The format that is used for the results. Currently the only supported value is CSV. |
apiVersion | The API version that the job was created in. |
Response Body - For an Unsuccessful Request
If the request fails, the server returns a non-200 status, and the request body shows details of the error. For example:
This example aborts the job with ID 750R000000146UvIAI:
The response is: