cURL Examples

The examples that demonstrate how to access the Lifecycle Management REST endpoints for API Platform Cloud Service using cURL.

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 Lifecycle Management REST endpoints for API Platform Cloud Service:

  • Set the CURL_CA_BUNDLE environment variable to the location of an SSL certificate authority (CA) certificate file or bundle to authenticate against the Verisign CA certificate. Alternatively, you can specify the location of your local CA certificate bundle on the command line by using the --cacert option.

    You can download an SSL 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.

  • Specify one or more of the following command-line options, as required, to direct the execution of cURL:

    cURL Option Description

    --cacert

    Specifies the location of the CA certificate bundle on the local machine.

    --data (-d)

    Specifies the request body, or data, either directly or by referring to a JSON file on the local machine.

    --header (-H)

    Defines a request header.

    --include (-i)

    Displays response header information.

    --method (-X)

    Indicates the type of request (for example, GET, POST, and so on).

    --user (-u)

    Specifies the user name and password for the API Platform Cloud Service account.

For more information about authentication requirements, see Security, Authentication and Authorization.

For example:

curl -i -X POST 
-u apicsadmin:password
-H "Content-Type: application/vnd.com.oracle.oracloud.provisioning.Service+json"
-d @<payload.json>
https://<psm_host>:<psm_port>/paas/api/v1.1/instancemgmt/{identityDomainID}/services/APICS/instances