Newer Version Available

This content describes an older version of this product. View Latest

Install cURL

The Bulk API uses HTTP GET and HTTP POST methods to send and receive CSV, XML, and JSON content, so it’s simple to build client applications using the tool or the language of your choice. This quick start uses a command-line tool called cURL to simplify sending and receiving HTTP requests and responses.

cURL is pre-installed on many Linux and Mac systems. Windows users can download a version at curl.haxx.se/. When using HTTPS on Windows, ensure that your system meets the cURL requirements for SSL.

cURL is an open-source tool and isn’t supported by Salesforce.

Note

Escaping the Session ID or Using Single Quotes on Mac and Linux Systems
When running the cURL examples, you can get an error on Mac and Linux systems due to the presence of the exclamation mark special character in the session ID argument. To avoid getting this error, use one of these solutions:
  • Escape the exclamation mark (!) special character in the session ID by inserting a backslash before it (\!) when the session ID is enclosed within double quotes. For example, the session ID string in this cURL command has the exclamation mark (!) escaped:
    1curl https://MyDomainName.my.salesforce.com/services/async/58.0/job 
    2-H "X-SFDC-Session: 00D50000000IehZ\!AQcAQH0dMHZfz972Szmpkb58urFRkgeBGsxL_QJWwYMfAbUeeG7c1E6
    3LYUfiDUkWe6H34r1AAwOR8B8fLEz6n04NPGRrq0FM"
  • Enclose the session ID within single quotes. For example:
    1curl https://MyDomainName.my.salesforce.com/services/async/58.0/job 
    2-H 'X-SFDC-Session: sessionID'