Step 1: Subscribe to the ServiceTo access Oracle Cloud Metering API, you must you must request a trial or paid subscription to an Oracle Cloud Service. See the following topics in Getting Started with Oracle Cloud:
Step 2: Obtain Account Information
From your account administrator, obtain the appropriate account credentials to access the Oracle Cloud Metering API. Specifically, you will need the User name and password.
Step 3: Get the Required Roles Assigned
Contact your account administrator to get the required role assigned to your user name in Oracle Cloud My Services. Specifically, you must have one of the following roles assigned to your account before you can use the Metering API:
- Identity Domain Administrator - This role is required if you are using a Traditional Cloud Account.
- Cloud Account Administrator - This role is assigned to the initial Cloud Account user by default and to users who have permission to perform all administration tasks within an Oracle Cloud Account.
- Service Administrator - This role is assigned to users who are assigned administration rights for one or more specific Cloud services. You can the use the API to obtain usage information about the services you administer.
If the required role is not assigned to you or you are not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Step 4: 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.
To install cURL on your system:
In your browser, navigate to the cURL home page at http://curl.haxx.se and click Download in the navigation menu.
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 extract the executable to the desired folder.
When running cURL from a Windows command shell only, you must provide an SSL certificate authority (CA) file or bundle to authenticate against the Verisign CS certificate.
Navigate to the cURL CA Certs page at http://curl.haxx.se/docs/caextract.html and download the cacert.pem SSL CA certificate bundle in the folder where you installed cURL.
Open a command window, navigate to the directory where you installed cURL, and set the cURL environment variable,
CURL_CA_BUNDLE, to the location of an SSL certificate authority (CA) certificate bundle. For example, on a Windows system you would enter:
C:\curl> set CURL_CA_BUNDLE=cacert.pem
You are now ready to send REST requests to the Oracle Cloud Metering API using cURL. For more information about using cURL, see Use cURL.