Create a job by sending a POST request to this URI. The request body identifies the type of object processed in all associated batches.
URI: /services/async/APIversion/job
Example XML request body
<?xml version="1.0" encoding="UTF-8"?>
<jobInfo
xmlns="http://www.force.com/2009/06/asyncapi/dataload">
<operation>insert</operation>
<object>Account</object>
<contentType>CSV</contentType>
</jobInfo>
Example XML response body
<?xml version="1.0" encoding="UTF-8"?>
<jobInfo
xmlns="http://www.force.com/2009/06/asyncapi/dataload">
<id>750D00000004SkLIAU</id>
<operation>insert</operation>
<object>Account</object>
<createdById>005D0000001b0fFIAQ</createdById>
<createdDate>2015-12-15T21:41:45.000Z</createdDate>
<systemModstamp>2015-12-15T21:41:45.000Z</systemModstamp>
<state>Open</state>
<concurrencyMode>Parallel</concurrencyMode>
<contentType>CSV</contentType>
<numberBatchesQueued>0</numberBatchesQueued>
<numberBatchesInProgress>0</numberBatchesInProgress>
<numberBatchesCompleted>0</numberBatchesCompleted>
<numberBatchesFailed>0</numberBatchesFailed>
<numberBatchesTotal>0</numberBatchesTotal>
<numberRecordsProcessed>0</numberRecordsProcessed>
<numberRetries>0</numberRetries>
<apiVersion>36.0</apiVersion>
<numberRecordsFailed>0</numberRecordsFailed>
<totalProcessingTime>0</totalProcessingTime>
<apiActiveProcessingTime>0</apiActiveProcessingTime>
<apexProcessingTime>0</apexProcessingTime>
</jobInfo>
Example JSON request body
{
"operation" : "insert",
"object" : "Account",
"contentType" : "JSON"
}
Example JSON response body
{
"apexProcessingTime" : 0,
"apiActiveProcessingTime" : 0,
"apiVersion" : 36.0,
"concurrencyMode" : "Parallel",
"contentType" : "JSON",
"createdById" : "005D0000001b0fFIAQ",
"createdDate" : "2015-12-15T20:45:25.000+0000",
"id" : "750D00000004SkGIAU",
"numberBatchesCompleted" : 0,
"numberBatchesFailed" : 0,
"numberBatchesInProgress" : 0,
"numberBatchesQueued" : 0,
"numberBatchesTotal" : 0,
"numberRecordsFailed" : 0,
"numberRecordsProcessed" : 0,
"numberRetries" : 0,
"object" : "Account",
"operation" : "insert",
"state" : "Open",
"systemModstamp" : "2015-12-15T20:45:25.000+0000",
"totalProcessingTime" : 0
}
In these samples, the contentType field indicates that the batches associated with the job are in CSV format. For alternative options, such as XML or JSON, see JobInfo.
warning: The operation value must match that shown in JobInfo. For example, you get an error if you use INSERT instead of insert.
See Also