Newer Version Available
Step Three: Send HTTP Requests with cURL
Setting Up Your Client Application
The REST API uses HTTP GET and HTTP POST methods to send and receive JSON and XML content, so it is very simple to build client applications using the tool or the language of your choice. We use 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.
Sending HTTP Requests Using REST API Resources
- An HTTP method (HEAD, GET, POST, PATCH, or DELETE).
- An OAuth 2.0 access token used to authenticate the request. For information on how to retrieve the token, see Quick Start.
- An HTTP ACCEPT header used to indicate the resource format (XML or JSON), or a .json or .xml extension to the URI. The default is JSON.
- The Lightning Platform REST resource.
- Any JSON or XML files containing information needed for requests, such as updating a record with new information.
- HEAD is used to retrieve resource metadata.
- GET is used to retrieve information, such as basic resource summary information.
- POST is used to create a new object.
- PATCH is used to update a record.
- DELETE is used to delete a record.
To access a resource, submit an HTTP request containing a header, method, and resource name.
The request HTTP header:
For a list of the resources and their corresponding URIs, see Reference.