Newer Version Available
Step 2: Create a Job
Before you can load data, you first create a job. The job specifies the type of object,
such as Contact, that you’re loading and the operation that you’re performing, such as query,
queryAll, insert, update, upsert, or delete. A job also grants you some control over the data
load process. For example, you can abort a job that is in progress.
- Create a text file called job.txt containing the following
text:
- Using a command-line window, execute the following cURL command:
curl https://instance.salesforce.com/services/async/44.0/job -H "X-SFDC-Session: sessionId" -H "Content-Type: application/xml; charset=UTF-8" -d @job.txt
instance is the portion of the <serverUrl> element and sessionId is the <sessionId> element that you noted in the login response.
Salesforce returns an XML response with data such as the following:
- Note the value of the job ID returned in the <id> element. Use this ID in subsequent operations.