cURL Examples
The examples within this document use cURL to demonstrate how to access the Exadata Cloud at Customer REST API.
For information about downloading and installing cURL, see http://curl.haxx.se/download.html. You must install a version of cURL that supports SSL.
Once installed, to use cURL to access the Exadata Cloud at Customer REST API:
-
In a command window, set the cURL environment variable,
CURL_CA_BUNDLE
, to the location of your local CA certificate bundle. Alternatively, you can specify the location of your local CA certificate bundle on the command line by using the--cacert
option.You can download a CA certificate bundle from http://curl.haxx.se/docs/caextract.html or provide your own. For information about CA certificate verification using cURL, see: http://curl.haxx.se/docs/sslcerts.html.
-
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 -d, --data @file.json
Identifies the request document, in JSON format, on the local machine. -F, --form @file.json
Identifies form data, in JSON format, on the local machine. -H
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
Displays response header information. -u, --user username:password
Specifies the user name and password for the <ProductName> account. -X
Indicates the type of request (for example, GET, POST, and so on). -
For more information about authentication requirements, see Security, Authentication and Authorization.
For example:
curl -I -X GET --cacert ~/cacert.pem --user serviceadmin:Pa55_word --H "X-ID-TENANT-NAME:usexample" https://dbaas.oraclecloud.com/paas/service/dbcs/api/v1.1/instances/usexample