Close a job by sending a POST request to this URI. The request URI identifies the job to close. When a job is closed, no more batches can be added.
URI: /services/async/APIversion/job/jobId
Example XML request body
<?xml version="1.0" encoding="UTF-8"?>
<jobInfo
xmlns="http://www.force.com/2009/06/asyncapi/dataload">
<state>Closed</state>
</jobInfo>
Example XML response body
<?xml version="1.0" encoding="UTF-8"?>
<jobInfo
xmlns="http://www.force.com/2009/06/asyncapi/dataload">
<id>750D0000000002lIAA</id>
<operation>insert</operation>
<object>Account</object>
<createdById>005D0000001ALVFIA4</createdById>
<createdDate>2009-04-14T18:15:59.000Z</createdDate>
<systemModstamp>2009-04-14T18:15:59.000Z</systemModstamp>
<state>Closed</state>
<concurrencyMode>Parallel</concurrencyMode>
<contentType>XML</contentType>
<numberBatchesQueued>0</numberBatchesQueued>
<numberBatchesInProgress>0</numberBatchesInProgress>
<numberBatchesCompleted>1</numberBatchesCompleted>
<numberBatchesFailed>0</numberBatchesFailed>
<numberBatchesTotal>1</numberBatchesTotal>
<numberRecordsProcessed>2</numberRecordsProcessed>
<numberRetries>0</numberRetries>
<apiVersion>36.0</apiVersion>
<numberRecordsFailed>0</numberRecordsFailed>
<totalProcessingTime>3647</totalProcessingTime>
<apiActiveProcessingTime>2136</apiActiveProcessingTime>
<apexProcessingTime>0</apexProcessingTime>
</jobInfo>
Example JSON request body
{
"state" : "Closed"
}
Example JSON response body
{
"apexProcessingTime" : 0,
"apiActiveProcessingTime" : 5059,
"apiVersion" : 36.0,
"concurrencyMode" : "Parallel",
"contentType" : "JSON",
"createdById" : "005xx000001SyhGAAS",
"createdDate" : "2015-11-19T01:45:03.000+0000",
"id" : "750xx000000000GAAQ",
"numberBatchesCompleted" : 10,
"numberBatchesFailed" : 0,
"numberBatchesInProgress" : 0,
"numberBatchesQueued" : 0,
"numberBatchesTotal" : 10,
"numberRecordsFailed" : 0,
"numberRecordsProcessed" : 100,
"numberRetries" : 0,
"object" : "Account",
"operation" : "insert",
"state" : "Closed",
"systemModstamp" : "2015-11-19T01:45:03.000+0000",
"totalProcessingTime" : 5759
}
See Also