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.

Set a Session Header

All HTTP requests must contain a valid API session ID obtained with the SOAP API login() call. The session ID is returned in the SessionHeader.

This example shows how to specify the required information after you obtain it from the login() call.

1POST /services/async/67.0/job/ HTTP/1.1
2Content-Type: application/xml; charset=UTF-8
3Accept: application/xml
4User-Agent: Salesforce Web Service Connector For Java/1.0
5X-SFDC-Session: sessionId
6Host: MyDomainName.my.salesforce.com
7Connection: keep-alive
8Content-Length: 135
9
10<?xml version="1.0" encoding="UTF-8"?>
11<jobInfo
12   xmlns="http://www.force.com/2009/06/asyncapi/dataload">
13 <operation>insert</operation>
14 <object>Account</object>
15</jobInfo>