You are here: Entitlement Management > Entitlement License Model Attributes > getEntFeatureLMAttributes

Retrieve License Model Attributes for a Feature

Description

Retrieve license model attributes and values for a feature in a line item product. The start date and end date attributes are retrieved in YYYY-MM-DD Hours:Minutes format.

Default Protocol Method Type URI
HTTPS GET getEntFeatureLMAttributes.xml

Query Parameters

Parameter Description Valid Values Optional
lineItemId Specify the line item ID. Integer No
productId Specify the product ID. Integer No
ftrId

Specify the auto-generated, unique record ID of the feature in EMS database.

Note: The ftrId is the handle returned by the addFeature.xml web service. You can retrieve ftrId by using the featureList.xml web service. In the response of this Web service, the value of tag 'id' under the 'feature' tag denotes ftrId.

Integer No

The possible values for the Usage Type license attribute are: 1 (Count Based) and 2 (Time Based).

For on-premise feature level licensing, the concurrent license model's counting type is 3 (Per Identity Per Station).

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 getEntFeatureLMAttributes.xml()throws Exception {
                if(!verifyLogin()){
                        return "login failed";
                }
                HttpContext context = new BasicHttpContext();
                context.setAttribute(ClientContext.USER_TOKEN, principal);
                HttpGet get = new HttpGet("https://localhost:8080/ems/3.6/getEntFeatureLMAttributes.xml");
                query = new StringBuffer();
                setParameter("ftrId", "");
                setParameter("lineItemId", "");
                setParameter("productId", "");
                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

<?xml version="1.0" encoding="UTF-8"?>
<emsResponse>
   <stat>ok</stat>
   <itemFeatureLicenseModel>
      <entFtrLMId>1</entFtrLMId>
      <feature>
         <id>1</id>
         <featureName>F1</featureName>
         <featureId>1</featureId>
      </feature>
      <licenseModel>
         <licenseModelId>1</licenseModelId>
         <licenseModelName>Subscription</licenseModelName>
      </licenseModel>
      <itemFeatureLicenseModelAttributes>
         <itemFeatureLicenseModelAttribute>
            <attributeId>1</attributeId>
            <attributeName>START_DATE</attributeName>
            <attributeValue>2015-03-11 00:00</attributeValue>
            <groupName>Time</groupName>
            <subGroupName>License Validity</subGroupName>
            <overridable>true</overridable>
         </itemFeatureLicenseModelAttribute>
         <itemFeatureLicenseModelAttribute>
            <attributeId>2</attributeId>
            <attributeName>END_DATE</attributeName>
            <attributeValue>2016-03-11 23:59</attributeValue>
            <groupName>Time</groupName>
            <subGroupName>License Validity</subGroupName>
            <overridable>true</overridable>
         </itemFeatureLicenseModelAttribute>
         <itemFeatureLicenseModelAttribute>
            <attributeId>4</attributeId>
            <attributeName>Usage Type</attributeName>
            <attributeValue>2</attributeValue>
            <groupName>Usage Type</groupName>
            <subGroupName>Usage Type</subGroupName>
            <overridable>true</overridable>
         </itemFeatureLicenseModelAttribute>
         <itemFeatureLicenseModelAttribute>
            <attributeId>9</attributeId>
            <attributeName>Grace Limit</attributeName>
            <attributeValue>0</attributeValue>
            <groupName>Grace</groupName>
            <subGroupName>Grace Limit</subGroupName>
            <overridable>true</overridable>
         </itemFeatureLicenseModelAttribute>
         <itemFeatureLicenseModelAttribute>
            <attributeId>10</attributeId>
            <attributeName>Measurement Unit(Duration)</attributeName>
            <attributeValue>02</attributeValue>
            <groupName>Grace</groupName>
            <subGroupName>Grace Limit</subGroupName>
            <overridable>true</overridable>
         </itemFeatureLicenseModelAttribute>
         <itemFeatureLicenseModelAttribute>
            <attributeId>16</attributeId>
            <attributeName>Vendor Attribute</attributeName>
            <attributeValue />
            <groupName>Vendor Attribute</groupName>
            <subGroupName>Vendor Attribute</subGroupName>
            <overridable>true</overridable>
         </itemFeatureLicenseModelAttribute>
      </itemFeatureLicenseModelAttributes>
   </itemFeatureLicenseModel>
</emsResponse>
See Also:

Output Format for Failure

Error Codes

Error Code Description
100 Invalid request parameter.
101 You are not authorized to use this service.
102 Invalid data entered.
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.]
128 You should log on first.
132 The URL address does not exist.
618 Could not find the entitlement line item.
644 Invalid lineItem Id.
680 The feature does not exist in the given product.
704 The entitlement item does not have this product.
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.