You are here: Entitlement Management > Entitlement > getEntitlementDetailsById

Retrieve Details of an Entitlement

Description

Retrieves the list of line items, with product(s), features(s), and license model, for a given entitlement ID.

The valid values for status of an entitlement or a line item are:

Default Protocol Method Type URI
HTTPS GET getEntitlementDetailsById.xml

Query Parameters

Parameter Description Valid Values Optional
entId

Identifier of the entitlement.

Note: The entId is the handle returned by the createEntitlement.xml web service. You can use the searchEntitlements.xml web service to retrieve entId for an entitlement.

Integer (>0) No
fetchCompleteEID

Specify whether to retrieve complete details of the entitlement.

Valid values are True or False.

Default Value: False

Boolean Yes

Sample Code

import java.io.IOException;
import java.net.URLDecoder;

//..............................
//..............................
//..............................
import org.apache.http.params.HttpParams;
public class EMSSample {
            private static DefaultHttpClient httpclient = new DefaultHttpClient();
            private static Principal principal = null;
            private static StringBuffer query;
            //..............................
            //..............................
            //..............................
public static String getEntitlementDetailsById.xml()throws Exception  {
    if(!verifyLogin()){
            return "login failed";
    }
    HttpContext context = new BasicHttpContext();
    context.setAttribute(ClientContext.USER_TOKEN, principal);
         HttpGet get = new HttpGet("https://localhost:8443/ems/3.6/getEntitlementDetailsById.xml");
    query = new StringBuffer();
    setParameter("fetchCompleteEID", "");
    setParameter("entId", "1");
    get.setURI(new URI(URLDecoder.decode(get.getURI() + query.toString(),"UTF-8")));
    HttpResponse response = httpclient.execute(get, context);
    HttpEntity entity = response.getEntity();
    byte[] b = null;
    if (entity != null) {
        long l = entity.getContentLength();
         b = new byte[(int) l];
         entity.getContent().read(b);
         entity.consumeContent();
            }
            return new String(b);
            }
    static void setParameter(String key, String value) {
            if (query.toString().equals("")) {
                        query.append("?" + key + "=" + value + "&");
            } else {
                        query.append(key + "=" + value + "&");
            }
    }
    }

Sample Response

For Cloud Deployment

<?xml version="1.0" encoding="UTF-8"?>
<emsResponse>
   <stat>ok</stat>
   <entitlement>
      <entId>1</entId>
      <eid>7daf1d****</eid>
      <entitlementType>enterprise</entitlementType>
      <startDate>2014-10-16</startDate>
      <endDate>2500-12-31</endDate>
      <customer>
         <customerId>2</customerId>
         <customerName>el</customerName>
         <customerRefId>el</customerRefId>
      </customer>
      <contact>
         <contactId>2</contactId>
         <contactEmailId>el@el.com</contactEmailId>
      </contact>
      <alternateEmailId>1@1.com</alternateEmailId>
      <state>2</state>
      <status>0</status>
      <refId1 />
      <refId2 />
      <featureCachingMode>Entitlement Level</featureCachingMode>
      <deploymentType>On-Premise</deploymentType>
      <stationCount>1</stationCount>
      <lineItems>
         <lineItem>
            <lineItemId>1</lineItemId>
            <lineItemName>P1</lineItemName>
            <status>0</status>
            <type>product</type>
            <enforcement>
               <enforcementId>1</enforcementId>
               <enforcementName>Sentinel Cloud</enforcementName>
               <enforcementVersion>3.5.0</enforcementVersion>
            </enforcement>
            <itemProduct>
               <itemFeatureLicenseModels>
                  <itemFeatureLicenseModel>
                     <entFtrLMId>1</entFtrLMId>
                     <feature>
                        <id>1</id>
                        <featureName>F1</featureName>
                        <featureId>1</featureId>
                     </feature>
                     <licenseModel>
                        <licenseModelId>2</licenseModelId>
                        <licenseModelName>Postpaid</licenseModelName>
                     </licenseModel>
                  </itemFeatureLicenseModel>
               </itemFeatureLicenseModels>
               <product>
                  <productId>1</productId>
                  <productName>P1</productName>
                  <productVersion>3.5</productVersion>
                  <refId1 />
                  <refId2 />
               </product>
               <itemServiceAgreement>
                  <entProductSAId>1</entProductSAId>
                  <serviceAgreement>
                     <serviceAgreementId>1</serviceAgreementId>
                     <serviceAgreementName>Service Agreement Template</serviceAgreementName>
                  </serviceAgreement>
               </itemServiceAgreement>
            </itemProduct>
         </lineItem>
      </lineItems>
      <creationTime>1413439715000</creationTime>
      <modificationTime>1413439791000</modificationTime>
      <timezone>(GMT) Greenwich Mean Time, : Dublin, Edinburgh, Lisbon, London</timezone>
      <detachInterval>2160</detachInterval>
      <usageCollection>On</usageCollection>
   </entitlement>
</emsResponse>

For On-premise Deployment

<?xml version="1.0" encoding="UTF-8"?>
<emsResponse>
   <stat>ok</stat>
   <entitlement>
      <entId>6</entId>
      <eid>0f6c7e****</eid>
      <entitlementType>enterprise</entitlementType>
      <startDate>2015-04-08</startDate>
      <endDate>2500-12-31</endDate>
      <customer>
         <customerId>4</customerId>
         <customerName>EL</customerName>
         <customerRefId>EL</customerRefId>
      </customer>
      <contact>
         <contactId>5</contactId>
         <contactEmailId>el@el.com</contactEmailId>
      </contact>
      <alternateEmailId />
      <state>2</state>
      <status>0</status>
      <refId1 />
      <refId2 />
      <featureCachingMode>Entitlement Level</featureCachingMode>
      <deploymentType>On-Premise</deploymentType>
      <stationCount>12</stationCount>
      <lineItems>
         <lineItem>
            <lineItemId>5</lineItemId>
            <lineItemName>P1</lineItemName>
            <status>0</status>
            <type>product</type>
            <enforcement>
               <enforcementId>1</enforcementId>
               <enforcementName>Sentinel Cloud</enforcementName>
               <enforcementVersion>3.6.0</enforcementVersion>
            </enforcement>
            <itemProduct>
               <itemFeatureLicenseModels>
                  <itemFeatureLicenseModel>
                     <entFtrLMId>9</entFtrLMId>
                     <feature>
                        <id>2</id>
                        <featureName>F2</featureName>
                        <featureId>2</featureId>
                     </feature>
                     <licenseModel>
                        <licenseModelId>1</licenseModelId>
                        <licenseModelName>Subscription</licenseModelName>
                     </licenseModel>
                  </itemFeatureLicenseModel>
                  <itemFeatureLicenseModel>
                     <entFtrLMId>10</entFtrLMId>
                     <feature>
                        <id>1</id>
                        <featureName>F1</featureName>
                        <featureId>1</featureId>
                     </feature>
                     <licenseModel>
                        <licenseModelId>2</licenseModelId>
                        <licenseModelName>Postpaid</licenseModelName>
                     </licenseModel>
                  </itemFeatureLicenseModel>
               </itemFeatureLicenseModels>
               <product>
                  <productId>1</productId>
                  <productName>P1</productName>
                  <productVersion>1</productVersion>
                  <refId1 />
                  <refId2 />
               </product>
               <itemServiceAgreement>
                  <entProductSAId>5</entProductSAId>
                  <serviceAgreement>
                     <serviceAgreementId>1</serviceAgreementId>
                     <serviceAgreementName>Service Agreement Template</serviceAgreementName>
                  </serviceAgreement>
               </itemServiceAgreement>
            </itemProduct>
         </lineItem>
      </lineItems>
      <creationTime>1428463880000</creationTime>
      <modificationTime>1428464275000</modificationTime>
      <timezone>(GMT) Greenwich Mean Time, : Dublin, Edinburgh, Lisbon, London</timezone>
      <detachInterval>Never Expires</detachInterval>
      <usageCollection>On</usageCollection>
      <vmEnabled>true</vmEnabled>
      <cloneProtection>true</cloneProtection>
   </entitlement>
</emsResponse>

     

Notes

For on-premise entitlements, the Web services response includes an additional tag <featureCachingMode>. The value of this tag can be one of the following:

See Also:

Output Format for Failure

Error Codes

Error Code Description
100 Invalid request parameter.
101 You are not authorized to use this service.
107 An internal error occurred! Please report the error to System administrator.
113 Specify a valid Boolean value for {field}. Valid values are true or false. [Note: This error code is applicable for the fields - fetchCompleteEID, loginAllowed, isEnabled, vmEnabled, clonePotection, and optional.].
118 {field} should be of data type integer. [Note: This error code is applicable for the fields - featureId, License modelId, entId, ftrId, customerId, lmId, templateType, lineItemId, CustomerId, stationCount, status, and granularity.]
120 {field} value is less than the minimum permitted value {value}. [Note: This error code is applicable for the fields - productd, featureId,entId, billType, lmId, lastModified, timeZoneId, customerId, and granularity.]
122 {field} is a required field and should have a not null value. [Note: This error code is applicable for the fields - Eid, namespaceName, featureName, startDate, endDate, userIds, featureId, productName, productVersion, detailsLM, lmId, templateType, customAttribute, lineItemId, customerRefId, granularity, loginId, oldPassword, and newPassword.]
128 You should log on first.
132 The URL address does not exist.
308 Entitlement's lifecyclestage is not valid.
621 Entitlement does not exist. Retry with a correct ID.
1081 Invalid Web service version provided
1084 No Web service version provided
1088 The EMS system is running on HTTPS. Please provide the correct Web service URL.