Use cURL
The examples within this document use cURL to demonstrate how to access the Oracle Access Governance. REST API.
Task 1: Install cURL
cURL is an open source, command-line tool for transferring data with URL syntax, supporting various protocols including HTTP and HTTPS.
To connect securely to the server, you must install a version of cURL that supports SSL and provide an SSL certificate authority (CA) certificate file or bundle to authenticate against the Verisign CA certificate.
Install cURL on Your System
To install cURL on your system:- Check if cURL is pre-installed. Open the terminal and type
curl --version
. If it displays the version details, cURL is already installed. - In your browser, navigate to the cURL home page at http://curl.haxx.se, and then click Download in the left navigation menu.
- On the cURL Releases and Downloads page, locate the SSL-enabled version of the cURL software that corresponds to your operating system, and then click the link to download the ZIP file.
- Install the software.
- Navigate to the cURL CA Certs page at http://curl.haxx.se/docs/caextract.html, and then download the ca-bundle.crt SSL certificate authority (CA) certificate bundle into the folder where you installed cURL.
- Set the cURL environment variable:
- Open a command window
- Navigate to the directory where you installed cURL.
- Set the cURL environment variable (CURL_CA_BUNDLE) to the SSL CA
certificate bundle location. For example:
C:\curl> set CURL_CA_BUNDLE=ca-bundle.crt
Note:
If you are using MacOS or other linux-based operating system, use the backslash (\
) for multi-line commands. For Windows, use the caret (^
) for multi-line commands in the Command Prompt.
Task 3: Invoke cURL
Invoke 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 |
---|---|
|
Specifies the request body, or data, either directly or by referring to a JSON file on the local machine. |
|
Specifies form data, either directly or by referring to a JSON file on the local machine. |
|
Defines a request header. |
|
Displays response header information. |
|
Specifies the user name and password for the Oracle Access Governance account. |
|
Indicates the type of request (for example, GET, POST, and so on). |