Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Step Five: Abort a Job

Abort an existing job by sending a POST request to this URI. The request URI identifies the job to abort. When a job is aborted, no more records are processed. If changes to data have been committed, they aren’t rolled back.

URI: /services/async/APIversion/job/jobId

Example XML request body

1<?xml version="1.0" encoding="UTF-8"?>
2<jobInfo
3   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
4 <state>Aborted</state>
5</jobInfo>

Example XML response body

1<?xml version="1.0" encoding="UTF-8"?>
2<jobInfo
3   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
4 <id>750D0000000002lIAA</id>
5 <operation>insert</operation>
6 <object>Account</object>
7 <createdById>005D0000001ALVFIA4</createdById>
8 <createdDate>2009-04-14T18:15:59.000Z</createdDate>
9 <systemModstamp>2009-04-14T18:16:00.000Z</systemModstamp>
10 <state>Aborted</state>
11 <concurrencyMode>Parallel</concurrencyMode>
12 <contentType>XML</contentType>
13 <numberBatchesQueued>0</numberBatchesQueued>
14 <numberBatchesInProgress>0</numberBatchesInProgress>
15 <numberBatchesCompleted>1</numberBatchesCompleted>
16 <numberBatchesFailed>0</numberBatchesFailed>
17 <numberBatchesTotal>1</numberBatchesTotal>
18 <numberRecordsProcessed>2</numberRecordsProcessed>
19 <numberRetries>0</numberRetries>
20 <apiVersion>36.0</apiVersion>
21 <numberRecordsFailed>0</numberRecordsFailed>
22 <totalProcessingTime>3647</totalProcessingTime>
23 <apiActiveProcessingTime>2136</apiActiveProcessingTime>
24 <apexProcessingTime>0</apexProcessingTime>
25</jobInfo>

Example JSON request body

1{
2   "state" : "Aborted"
3}

Example JSON response body

1{
2   "apexProcessingTime" : 0,
3   "apiActiveProcessingTime" : 2166,
4   "apiVersion" : 36.0,
5   "concurrencyMode" : "Parallel",
6   "contentType" : "JSON",
7   "createdById" : "005D0000001b0fFIAQ",
8   "createdDate" : "2015-12-15T21:54:29.000+0000",
9   "id" : "750D00000004SkVIAU",
10   "numberBatchesCompleted" : 2,
11   "numberBatchesFailed" : 0,
12   "numberBatchesInProgress" : 0,
13   "numberBatchesQueued" : 0,
14   "numberBatchesTotal" : 2,
15   "numberRecordsFailed" : 0,
16   "numberRecordsProcessed" : 2,
17   "numberRetries" : 0,
18   "object" : "Account",
19   "operation" : "insert",
20   "state" : "Aborted",
21   "systemModstamp" : "2015-12-15T21:54:29.000+0000",
22   "totalProcessingTime" : 2870
23}