Authentication

Calls to the monitoring API require basic authentication (user name and password).

You access the Oracle Cloud service REST resources over HTTPS and must provide the following information for authentication:

  • User name and password for your Oracle Cloud service account.

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

    For Cloud accounts with Oracle Identity Cloud Service, the identity domain ID is the IDCS GUID that identifies the identity domain for the users within Identity Cloud Service. To obtain the IDCS GUID, go to the Users page in My Services dashboard and click on Identity Console. The URL in the browser address field will show you the IDCS GUID for your identity domain.

For example, to authenticate using cURL:

  • Use the -u cURL option to pass the user name and password for your Oracle Cloud Service account (for example,joe@example.com and Mypassword1!).

  • Use the -H cURL option to pass the X-ID-TENANT-NAME custom header.

  • When running cURL from a Windows command shell only, set the cURL environment variable, CURL_CA_BUNDLE, 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, using the ?cacert command line option.

    You can download an SSL CA certificate bundle from http://curl.haxx.se/docs/caextract.html or provide your own. See http://curl.haxx.se/docs/sslcerts.html.

The following example cURL command retrieves various metric types that can be accessed by the user:

curl -i -X GET -u joe@example.com:Mypassword1! -H "X-ID-TENANT-NAME:mydomain" https://monitoring.us.oraclecloud.com/monitoring/mydomain/.customer/api/v1/metricTypes