Query license usage and availability

Using the 10Duke Entitlement Management REST API, you can query information on license usage and how licenses are available to users or device clients.

Query available licenses for a user or device client

When you query the available licenses for a user or a device client, this returns information on the organization licenses that the user or device client is authorized to use, and for a user, also the personal licenses they have.

To query the available licenses for a user, send a GET request to /users/{userId}/available-licenses. See details in the API reference.

To make a similar query for a device client, send a GET request to /clients/{clientId}/available-licenses. See details in the API reference.

You can choose whether to also retrieve expired licenses. By default, the operations don’t return licenses whose expiry date was over a year ago. If you wish to change the time threshold in your deployment, contact the 10Duke Integration Support team.

Request example

This is an example request for querying the available licenses for a user. Querying the available licenses for a device client is done in a similar way.

This example request uses curl (line breaks added for display purposes):

curl --request GET
   --url <API_base_path>/users/me/available-licenses

Response example

This is a sample response to querying a user’s available licenses. It shows information that the response body can contain:

[{
   "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
   "validFrom": "2023-02-19T14:12:22.012Z",
   "validUntil": "2024-02-19T14:12:22.012Z",
   "active": true,
   "entitlementId": "79a605b5-f302-4c5d-bbc7-cbd58f1a9b0d",
   "licensedItem": {
      "id": "93f0b0cc-e848-4f8a-b0db-70da8e511234",
      "name": "CutXPro",
      "displayName": "CutXPro"
   },
   "licenseModelId": "9188e9b9-12fc-4882-91eb-d433650e42dc",
   "licenseModelName": "License_Model_Seats_based",
   "seatsTaken": 0,
   "seatsReserved": 0,
   "seatsTotal": 1,
   "seatCountCredits": [{
      "id": "3d969a10-4b61-4b93-9340-5bbc6220dda7",
      "validFrom": "2023-02-19T14:12:22.012Z",
      "validUntil": "2024-02-19T14:12:22.012Z",
      "active": true,
      "licenseId": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "licenseTransactionItemId": "4868fa9a-dccf-48d7-b789-767af81c37a0",
      "seatCount": 1,
      "seatsConsumed": 0
   }],
   "owner": {
      "id": "33e047a7-99bf-4ac5-8fea-b3d6f9d4ed1d",
      "name": "CustomerOrganization"
   }
}]

Query users or device clients with access to an entitlement

To query which users have access to the licenses in a specific entitlement, send a GET request to /organizations/{orgId}/entitlements/{entId}/consuming-users. See details in the API reference.

To make a similar query for device clients, send a GET request to /organizations/{orgId}/entitlements/{entId}/consuming-clients. See details in the API reference.

Query usage of a license

To query information on the usage of a particular license, send a GET request to /organizations/{orgId}/entitlements/{entId}/licenses/{licenseId}/usage. See details in the API reference.

Query licenses used by a user or a device client

To query information on the licenses that a user is currently consuming or has a seat reservation to, send a GET request to /users/{userId}/license-usage. See details in the API reference.

To make a similar query for a device client, send a GET request to /clients/{clientId}/license-usage. See details in the API reference.