Obtaining Entitlement IDs Using My Services API

Using the My Services API you can obtain a complete list of services that you are entitled to use. You can also obtain entitlement IDs such as service entitlement IDs and purchase entitlement IDs which can be used for obtaining billing and usage reports. The information obtained also allows you to make more specific requests using the Metering API.

Note:

  • A service entitlement ID is a system generated unique ID for all the given services in a service category.

  • A purchase entitlement ID is a unique id which is created when a user buys Oracle Cloud services and is associated with the Cloud Account.

cURL Command

The following example shows how to obtain entitlement IDs using My Services API by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.

curl -X GET -u joe@example.com -H "X-ID-TENANT-NAME:{domain}" "https://itra.oraclecloud.com/itas/{domain}/myservices/api/v1/serviceEntitlements"

In the above example, domain 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:

https://idcs-105bbbdfe5644611bf7ce04496073adf.identity.oraclecloud.com/ui/v1/adminconsole/?root=users

In the above URL, idcs-105bbbdfe5644611bf7ce04496073adf is the IDCS GUID for your identity domain.

Example of Response Body

The following example shows the response body in JSON format.

{
     "items": [
         {
             "id": "cesi-511202718",                          // Unique ServiceEntitlementId
             "purchaseEntitlement": {                         // Purchase Entitlement is the entity bought by a customer
                 "subscriptionId": "511203590",
                 "id": "511203590",
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/purchaseEntitlements/511203590"
             },
             "serviceDefinition": {
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceDefinitions/500089778",
                 "id": "500089778",
                 "name": "Storage"                            // The customer is entitled to use the Storage Service
             },
             "createdOn": "2017-12-20T16:23:23.326Z",
             "createdBy": "paul.smith@oracle.com",
             "modifiedOn": "2017-12-20T18:35:40.628Z",
             "modifiedBy": "paul.smith@oracle.com",
             "identityDomain": {                              // Identity Domain to which the Service Entitlement is associated
                 "id": "511203592",
                 "name": "myenvironment",
                 "displayName": "myenvironment"
             },
             "cloudAccount": {                                // Cloud Account to which the Service Entitlement is associated
                 "id": "cacct-be7475efc2c54995bc842d3379d35812",
                 "name": "myenvironment",
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/cloudAccounts/cacct-be7475efc2c54995bc842d3379d35812"
             },
             "status": "ACTIVE",                              // Current Status
             "serviceConfigurations": {                       // Specific configuration information such as Exadata configuration
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceEntitlements/cesi-511202718/serviceConfigurations"
             },
             "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceEntitlements/cesi-511202718"
         },
         {
             "id": "cesi-511202719",
             "purchaseEntitlement": {
                 "subscriptionId": "511203590",
                 "id": "511203590",
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/purchaseEntitlements/511203590"
             },
             "serviceDefinition": {
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceDefinitions/500123193",
                 "id": "500123193",
                 "name": "Compute"                            // The customer is entitled to use the Compute Service
             },
             "createdOn": "2017-12-20T16:23:23.326Z",
             "createdBy": "paul.smith@oracle.com",
             "modifiedOn": "2017-12-20T18:35:40.628Z",
             "modifiedBy": "paul.smith@oracle.com",
             "identityDomain": {
                 "id": "511203592",
                 "name": "myenvironment",
                 "displayName": "myenvironment"
             },
             "cloudAccount": {
                 "id": "cacct-be7475efc2c54995bc842d3379d35812",
                 "name": "myenvironment",
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/cloudAccounts/cacct-be7475efc2c54995bc842d3379d35812"
             },
             "status": "ACTIVE",
             "serviceConfigurations": {
                 "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceEntitlements/cesi-511202719/serviceConfigurations"
             },
             "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceEntitlements/cesi-511202719"
         },
         ...                                                  // More Service Entitlements could be displayed
     ],
 "canonicalLink": "/itas/{domain}/myservices/api/v1/serviceEntitlements",
 "hasMore": false,
 "limit": 25,
 "offset": 0
 }