Create Entitlements

In this section, we will create a basic entitlement first using the product created earlier.

Create a Basic Entitlement with Product ‘Print-Scan’

In this section we will create an entitlement with minimum prerequisites. Let us use the product Printer-Scanner without any modification.

You can create an entitlement by using the following API endpoint:

POST /ems/api/v5/entitlements

The JSON elements used in the API endpoint are:

JSON Element Value Description Required/Optional
activationAllowed true Indicates that activation is allowed for the entitlement. Optional
revocationAllowed true

Indicates that revocation is allowed for the entitlement.

Optional
state ENABLE

State of the entitlement. The default value is DRAFT.

> DRAFT: The entitlement is not ready yet. It can be modified or deleted.

> ENABLE: The entitlement is complete. It can be activated.

Optional
Associated Product      
totalQuantity 10 Total number of licenses that can be generated for products associated with the entitlement. Optional
activationMethod FIXED

Activation method for the product. The Fixed value indicates that the provided quantity can be consumed in multiple activations, and each activation will consume a specified fixed quantity.

Optional
fixedQuantity 1 Quantity to be consumed when the activation method is fixed. Optional
name Printer-Scanner Name of the product associated with the entitlement. Required
version 1

Version of the product associated with the entitlement.

Required
Associated Customer      
name TestSoftware Name of the customer associated with the entitlement. Optional
Associated User      
emailId TestUser@example.com E-mail address of the user associated with the entitlement. Optional

NOTE for Sentinel LDK

You also need to set parameters related to the memory file if you want to associate a memory file with the Sentinel LDK product.

Sample Input

You can use the following XML to create an entitlement for the product Printer-Scanner, customer TestSoftware, and user TestUser@example.com.

{
  "entitlement": {
    "activationAllowed": true,
    "revocationAllowed": true,
    "state": "ENABLE",
    "customer": {
      "name": "TestSoftware"
       },	
    "contact": {
      "emailId": "TestUser@example.com"
    },
    "productKeys": {
      "productKey": {
        "totalQuantity": 10,
        "activationMethod": "FIXED",
        "fixedQuantity": 1,
        "item": {
          "itemProduct": {
            "product": {
              "nameVersion": {
                "name": "Printer-Scanner",
                "version": "1"
              }
            }
          }
        }
      }
    }
}
}

NOTE for Sentinel LDK

>Include the extnLDK object. In the extnLDK > prdMemoryReferences object, add the memoryFile object. Set filename to TestFile.

Example

{
  "entitlement": {
    "activationAllowed": true,
    "state": "ENABLE",
    "productKeys": {
      "productKey": [
        {
          "totalQuantity": 10,
          "activationMethod": "FIXED",
          "fixedQuantity": 1,
          "extnLDK": {
            "prdMemoryReferences": {
              "memoryFile": [
                {
                  "fileName": "TestFile"
                }
              ]
            }
          },
          "item": {
            "itemProduct": {
              "product": {
                "nameVersion": {
                  "name": "Printer-Scanner",
                  "version": "1"
                }
              }
            }
          }
        }
      ]
    }
  }
}

Sample Response (Success)

Response Body
{
  "entitlement": {
    "externalId": "",
    "entitlementAsWhole": "false",
    "eId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "startDate": "2018-06-14",
    "expiry": {
      "neverExpires": "true"
    },
    "customer": {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "name": "TestSoftware",
      "identifier": "CIdentifier",
      "externalId": "CExternalId"
    },
    "contact": {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "emailId": "TestUser@example.com"
    },
    "userRegistration": "OPTIONAL",
    "refId1": "",
    "refId2": "",
    "activationAllowed": "true",
    "allowActivationBy": "ALL_USERS",
    "revocationAllowed": "true",
    "state": "ENABLE",
    "sendNotification": "true",
    "ccEmail": "",
    "isTest": "false",
    "customAttributes": {
      "customAttribute": [
        {
          "name": "8696-Search-custBoolean",
          "value": "FALSE"
        },
        {
          "name": "8696-Search-custDate",
          "value": ""
        },
        {
          "name": "8696-Search-custList",
          "value": "DEFAULT-VALUE"
        },
        {
          "name": "8696-Search-custNumeric",
          "value": ""
        },
        {
          "name": "8696-Search-custString",
          "value": ""
        },
        {
          "name": "8696-Search-custxml",
          "value": ""
        },
        {
          "name": "entBool",
          "value": "FALSE"
        },
        {
          "name": "entDate",
          "value": "2018-03-01"
        },
        {
          "name": "entList",
          "value": "entList"
        },
        {
          "name": "entNum",
          "value": "10"
        },
        {
          "name": "entStr",
          "value": "entStr"
        },
        {
          "name": "entStrOpt",
          "value": "6"
        },
        {
          "name": "entXml",
          "value": "\n\t<![CDATA[\n\t\t<a>\n                  <abc>qwerty</abc>\n\t\t</a>\n\t]]>\n    "
        }
      ]
    },
    "productKeys": {
      "productKey": {
        "pkId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "startDate": "2018-06-14",
        "expiry": {
          "neverExpires": "true"
        },
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "enforcement": {
          "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "name": "Sentinel RMS",
          "version": "9.2"
        },
        "totalQuantity": "10",
        "availableQuantity": "10",
        "splittedQuantity": "0",
        "activationMethod": "FIXED",
        "fixedQuantity": "1",
        "state": "ENABLE",
        "item": {
          "itemProduct": {
            "product": {
              "externalId": "",
              "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
              "nameVersion": {
                "name": "Printer-Scanner",
                "version": "1.0"
              }
            },
            "itemProductFeatures": {
              "itemProductFeature": [
                {
                  "feature": {
                    "externalId": "",
                    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                    "identifier": "",
                    "nameVersion": {
                      "name": "Print",
                      "version": ""
                    }
                  },
                  "itemFeatureLicenseModel": {
                    "licenseModel": {
                      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                      "name": "Trial Standalone"
                    },
                    "attributes": {
                      "attribute": [
                        {
                          "name": "DEPLOYMENT_TYPE",
                          "value": "0"
                        },
                        {
                          "name": "LICENSE_TYPE",
                          "value": "1"
                        },
                        {
                          "name": "START_DATE",
                          "value": "2018-06-14 08:36"
                        },
                        {
                          "name": "END_DATE",
                          "value": "2019-06-14 08:36"
                        },
                        {
                          "name": "FLOATING_USER_LIMIT",
                          "value": "1"
                        },
                        {
                          "name": "FLOATING_SOFT_USER_LIMIT",
                          "value": "10000000"
                        },
                        {
                          "name": "KEY_LIFETIME_MINUTES",
                          "value": "5"
                        },
                        {
                          "name": "TRIAL_DURATION_DAYS",
                          "value": "30"
                        },
                        {
                          "name": "TRIAL_DURATION_HOURS",
                          "value": "0"
                        },
                        {
                          "name": "ALLOW_COMMUTER",
                          "value": "FALSE"
                        },
                        {
                          "name": "ALLOW_GRACE",
                          "value": "0"
                        },
                        {
                          "name": "GRACE_PERIOD_DAYS",
                          "value": "0"
                        },
                        {
                          "name": "GRACE_PERIOD_ELAPSED_HOURS",
                          "value": "0"
                        },
                        {
                          "name": "COMMUTER_MAX_CHECKOUT_DAYS",
                          "value": "0"
                        },
                        {
                          "name": "SHARING_CRITERIA",
                          "value": "0"
                        },
                        {
                          "name": "SHARING_LIMIT",
                          "value": "0"
                        },
                        {
                          "name": "HOLDING_CRITERIA",
                          "value": "0"
                        },
                        {
                          "name": "KEY_HOLDTIME_MINUTES",
                          "value": "0"
                        },
                        {
                          "name": "OUTPUT_TYPE",
                          "value": "0"
                        },
                        {
                          "name": "ENFORCE_LICENSE_EXCLUSIVE",
                          "value": "1"
                        },
                        {
                          "name": "ENFORCE_CLOCK_TAMPERED",
                          "value": "TRUE"
                        },
                        {
                          "name": "LOG_ENCRYPT_LEVEL",
                          "value": "0"
                        },
                        {
                          "name": "ALLOW_REDUNDANCY",
                          "value": "FALSE"
                        },
                        {
                          "name": "ENFORCE_REDUNDANCY_MAJORITY",
                          "value": "FALSE"
                        },
                        {
                          "name": "IS_TRIAL",
                          "value": "TRUE"
                        },
                        {
                          "name": "KEY_TYPE",
                          "value": "1"
                        },
                        {
                          "name": "NUMERIC_TYPE",
                          "value": "0"
                        },
                        {
                          "name": "ELAN_KEY_FLAG",
                          "value": "0"
                        },
                        {
                          "name": "USE_AUTH_CODE",
                          "value": "0"
                        },
                        {
                          "name": "CAPACITY",
                          "value": "0"
                        },
                        {
                          "name": "CAPACITY_FLAG",
                          "value": "0"
                        },
                        {
                          "name": "LOCKING_MODE",
                          "value": "2"
                        },
                        {
                          "name": "NUM_SUBNET",
                          "value": "0"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_FLAG",
                          "value": "0"
                        },
                        {
                          "name": "CODE_TYPE",
                          "value": "1"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_REQUIRED",
                          "value": "4"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_FLOAT",
                          "value": "0"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_MIN_NUM",
                          "value": "1"
                        },
                        {
                          "name": "SITE_LIC_2_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_1_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_4_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_3_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_5_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_6_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_7_INFO",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_PRIVATE_INFO",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_PUBLIC_INFO",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_COMMENTS",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_NUM_OF_SECRETS",
                          "value": "0"
                        },
                        {
                          "name": "VENDOR_SECRETS_1",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_2",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_3",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_4",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_5",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_6",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_7",
                          "value": ""
                        }
                      ]
                    }
                  },
                  "itemFeatureState": "INCLUDED"
                },
                {
                  "feature": {
                    "externalId": "",
                    "id": "528bc745-d32b-4543-af3b-b6e6c6e4d2d6",
                    "identifier": "",
                    "nameVersion": {
                      "name": "Scan",
                      "version": ""
                    }
                  },
                  "itemFeatureLicenseModel": {
                    "licenseModel": {
                      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                      "name": "Trial Standalone"
                    },
                    "attributes": {
                      "attribute": [
                        {
                          "name": "DEPLOYMENT_TYPE",
                          "value": "0"
                        },
                        {
                          "name": "LICENSE_TYPE",
                          "value": "1"
                        },
                        {
                          "name": "START_DATE",
                          "value": "2018-06-14 08:36"
                        },
                        {
                          "name": "END_DATE",
                          "value": "2019-06-14 08:36"
                        },
                        {
                          "name": "FLOATING_USER_LIMIT",
                          "value": "1"
                        },
                        {
                          "name": "FLOATING_SOFT_USER_LIMIT",
                          "value": "10000000"
                        },
                        {
                          "name": "KEY_LIFETIME_MINUTES",
                          "value": "5"
                        },
                        {
                          "name": "TRIAL_DURATION_DAYS",
                          "value": "30"
                        },
                        {
                          "name": "TRIAL_DURATION_HOURS",
                          "value": "0"
                        },
                        {
                          "name": "ALLOW_COMMUTER",
                          "value": "FALSE"
                        },
                        {
                          "name": "ALLOW_GRACE",
                          "value": "0"
                        },
                        {
                          "name": "GRACE_PERIOD_DAYS",
                          "value": "0"
                        },
                        {
                          "name": "GRACE_PERIOD_ELAPSED_HOURS",
                          "value": "0"
                        },
                        {
                          "name": "COMMUTER_MAX_CHECKOUT_DAYS",
                          "value": "0"
                        },
                        {
                          "name": "SHARING_CRITERIA",
                          "value": "0"
                        },
                        {
                          "name": "SHARING_LIMIT",
                          "value": "0"
                        },
                        {
                          "name": "HOLDING_CRITERIA",
                          "value": "0"
                        },
                        {
                          "name": "KEY_HOLDTIME_MINUTES",
                          "value": "0"
                        },
                        {
                          "name": "OUTPUT_TYPE",
                          "value": "0"
                        },
                        {
                          "name": "ENFORCE_LICENSE_EXCLUSIVE",
                          "value": "1"
                        },
                        {
                          "name": "ENFORCE_CLOCK_TAMPERED",
                          "value": "TRUE"
                        },
                        {
                          "name": "LOG_ENCRYPT_LEVEL",
                          "value": "0"
                        },
                        {
                          "name": "ALLOW_REDUNDANCY",
                          "value": "FALSE"
                        },
                        {
                          "name": "ENFORCE_REDUNDANCY_MAJORITY",
                          "value": "FALSE"
                        },
                        {
                          "name": "IS_TRIAL",
                          "value": "TRUE"
                        },
                        {
                          "name": "KEY_TYPE",
                          "value": "1"
                        },
                        {
                          "name": "NUMERIC_TYPE",
                          "value": "0"
                        },
                        {
                          "name": "ELAN_KEY_FLAG",
                          "value": "0"
                        },
                        {
                          "name": "USE_AUTH_CODE",
                          "value": "0"
                        },
                        {
                          "name": "CAPACITY",
                          "value": "0"
                        },
                        {
                          "name": "CAPACITY_FLAG",
                          "value": "0"
                        },
                        {
                          "name": "LOCKING_MODE",
                          "value": "2"
                        },
                        {
                          "name": "NUM_SUBNET",
                          "value": "0"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_FLAG",
                          "value": "0"
                        },
                        {
                          "name": "CODE_TYPE",
                          "value": "1"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_REQUIRED",
                          "value": "4"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_FLOAT",
                          "value": "0"
                        },
                        {
                          "name": "LOCAL_REQUEST_LOCKCRIT_MIN_NUM",
                          "value": "1"
                        },
                        {
                          "name": "SITE_LIC_2_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_1_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_4_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_3_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_5_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_6_INFO",
                          "value": ""
                        },
                        {
                          "name": "SITE_LIC_7_INFO",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_PRIVATE_INFO",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_PUBLIC_INFO",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_COMMENTS",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_NUM_OF_SECRETS",
                          "value": "0"
                        },
                        {
                          "name": "VENDOR_SECRETS_1",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_2",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_3",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_4",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_5",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_6",
                          "value": ""
                        },
                        {
                          "name": "VENDOR_SECRETS_7",
                          "value": ""
                        }
                      ]
                    }
                  },
                  "itemFeatureState": "INCLUDED"
                }
              ]
            }
          }
        },
        "commonLicenseAttributes": {
          "commonLicenseAttribute": [
            {
              "name": "LICENSE_VERSION",
              "value": "18"
            },
            {
              "name": "ALLOW_VM_DETECTION",
              "value": "0"
            }
          ]
        },
        "activationAttributes": "",
        "customAttributes": {
          "customAttribute": [
            {
              "name": "8656-Search-LI-Numeric",
              "value": ""
            },
            {
              "name": "8656-Search-LI-String",
              "value": ""
            },
            {
              "name": "itemBool",
              "value": "TRUE"
            },
            {
              "name": "itemDate",
              "value": "2018-03-01"
            },
            {
              "name": "itemList",
              "value": "itemList"
            },
            {
              "name": "itemNum",
              "value": "1"
            },
            {
              "name": "itemStr",
              "value": "itemStr"
            },
            {
              "name": "itemStrOpt",
              "value": ""
            }
          ]
        }
      }
    }
  }
}

 

A pkId is generated for the product associated with the entitlement, as highlighted in the bold-red in the response body above. This pkId will be used in the next step Create and Complete Activation.

NOTE   For Sentinel LDK, the response object contains different parameters and values. The objects activationAttributes and commonLicenseAttributes (shown in the response above) are not relevant. Refer to NOTE for Sentinel LDK for more details.

HTTP Status Code

201 (Created)

Response Header

The auto-generated unique identifier (id) of the new entitlement is returned in the response header. For example:

location: /api/v5/entitlements/xxxxx-xxxxx-xxxxx-xxxxx