Query license usage and availability
Using the 10Duke Entitlement Management REST API, you can query information on license usage and what licenses are available for a user.
Query available licenses for a user
When you query the available licenses for a user, this returns information on the organization licenses that the user is authorized to use and the personal licenses they have. The response only contains licenses that are currently valid.
To query the available licenses for a user, send a GET request to /users/{userId}/available-licenses
. See details in the API reference.
Request example
This is an example request for querying the available licenses for a user.
This example request uses curl
(line breaks added for display purposes):
curl --request GET
--url https://<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 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
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.