Atom feed of this document
 
 
 

 3.1. Send API Requests Using cURL

cURL is a command-line tool that is available on most UNIX®-like environments and Mac OS X® and can be downloaded for Windows® in order to interact with the ReST interfaces. For more information on cURL, visit http://curl.haxx.se/.

cURL allows you to transmit and receive HTTP requests and responses from the command-line or from within a shell script. This makes it possible to work with the ReST API directly without using one of the client APIs.

The following cURL command-line options will be used in this guide to run the examples:

cURL Command-Line Options

-d

Sends the specified data in a post request to the HTTP server.

-i

Includes the HTTP header in the output.

-H HEADER

Specify an HTTP header in the request.

-X

Specifies the request method to use when communicating with the HTTP server. The specified request is used instead of the default method, which is GET. For example, -X PUT specifies to use the PUT request method.

[Note]Note

If you have the tools, you can run the cURL JSON request examples with the following options to format the output from cURL: <curl JSON request example> | python -mjson.tool.