Use cURL

The examples within this document use cURL to demonstrate how to access the Oracle Communications Billing Care REST API. Set up your environment to use cURL by performing these tasks:

Task 1: Install cURL

To connect securely to the server, you must install a version of cURL that supports SSL and provide an SSL certificate authority (CA) file or bundle to authenticate against the CA certificate store, such as Verisign. For more information about authentication, see "Authenticate".

The following procedure demonstrates how to install cURL on a Windows 64-bit system:

  1. In your browser, navigate to the cURL home page at https://curl.haxx.se and click Download at the top left.

  2. On the cURL Releases and Downloads page, locate the SSL-enabled version of the cURL software that corresponds to your operating system, click the link to download the ZIP file, and then install the software.

  3. Go to the cURL CA certificates extracted from Mozilla page at https://curl.haxx.se/docs/caextract.html and then download the cacert.pem SSL CA certificate bundle to the folder in which you installed cURL.

Task 2: Set Environment Variable for cURL

In a command window, set the cURL environment variable, CURL_CA_BUNDLE, to the location of your local CA certificate bundle. For example:

C:\curl> set CURL_CA_BUNDLE=cacert.pem

For information about CA certificate verification using cURL, see https://curl.haxx.se/docs/sslcerts.html.

Task 3: Start cURL

Start cURL and specify one or more of the command-line options defined in the following table, as required, to direct its execution.

cURL Option Description
-d @filename.json
--data @filename.json
Identifies the file that contains the request body, in JSON format, on the local machine. Alternatively, you can pass the request body with -d "{id=5,status='OK'}".
-F @filename.json
--form @filename.json
Identifies form data, in JSON format, on the local machine.
-H
--header
Defines one or both of the following:
  • Content type of the request document

  • Custom header, X-ID-TENANT-NAME, to identify the identity domain

-i
--include
Displays header information in the response.
-X method
--request method
Indicates the type of request method (for example, GET or POST).