10Duke Enterprise release 3 documentation is no longer being updated

Provision a floating license

Floating licensing is most commonly used in B2B sales. It’s a software licensing approach where a limited number of licenses for a software application are shared among a larger number of users or device clients over a period of time. A floating license requires a seat-based license model with floating seats.

In floating licensing, when an authorized user or device client wishes to run your software application, they request to consume a license from the common pool of licenses. If a license is available, 10Duke Enterprise creates a license lease and grants a license token to the application.

When the user or device client stops using the application or the license lease period expires, the license is returned to the license pool and made available to other authorized users and device clients.

This article explains how to provision (grant) a floating license to an organization using the 10Duke Entitlement Management REST API. For background, see how license provisioning through the API uses the concept of a transaction.

The article assumes you have connected your client application to 10Duke Enterprise and implemented license consumption for it.

API operation

10Duke Entitlement Management REST API operation:

Item URL (relative, prepend the environment base URL)
Provision a license to an organization POST /organizations/{orgId}/license-transactions)

Example

This example shows how to provision a floating license to an organization which has purchased 10 license seats to be shared by a larger number of users.

The API request is the same as for any other license type for which license seats are being provisioned. What makes the license a floating license is the license model, based on which the license’s seats are shared by users on a “first come, first served” basis.

The example uses the following business case:

  • Product being sold: CutXEnterprise, a B2B desktop software application that allows end users to crop elements from photographs

  • Quantity sold: 10 license seats

  • Product package in 10Duke Enterprise: Name CutXEnterprise, product ID 57042763-559c-4503-8db2-432d4fe82431

  • Customer: A B2B customer organization, organization ID `cce56388-2c7f-4dd7-8007-b7c3fbd47901

  • License terms: The license is sold for an initial term of 12 months

Request example

Send a POST request to /organizations/{orgId}/license-transactions. See the API reference for details on the API path parameters, request body, and response schemas.

This example request uses curl (line breaks added for display purposes). The request specifies licenseValidFrom and licenseValidUntil dates to set a 12-month validity for the license.

curl --request POST
   --url <API_base_path>/organizations/cce56388-2c7f-4dd7-8007-b7c3fbd47901/license-transactions
   --header 'content-type: application/json'
   --data '{"transaction":{"type":"Order","externalId":"0000004556786","items":[{"externalId":"0001","productId":"57042763-559c-4503-8db2-432d4fe82431","quantity":10,"licenseValidFrom":"2023-02-19T14:12:22.012Z","licenseValidUntil":"2024-02-19T14:12:22.012Z"}]}}'

Response example

This sample response shows information that the response body can contain:

{
   "transaction": {
      "id": "8ec39f9d-f739-4bc1-aa55-8cb712e50adb",
      "type": "Order",
      "externalId": "0000004556786",
      "processed": "2023-02-19T14:12:22.010Z",
      "items": [{
         "id": "e0588c33-7055-4b28-8ec6-9e92c6f3b94f",
         "externalId": "0001",
         "productId": "57042763-559c-4503-8db2-432d4fe82431",
         "quantity": 10,
         "licenseValidFrom": "2023-02-19T14:12:22.012Z",
         "licenseValidUntil": "2024-02-19T14:12:22.012Z",
         "licenses": [{
            "id": "48e04c21-1fae-4ddf-ab5a-e0644039c81e",
            "validFrom": "2023-02-19T14:12:22.012Z",
            "validUntil": "2024-02-19T14:12:22.012Z",
            "active": true,
            "entitlementId": "6bde22fa-ecd4-4017-9b61-d661c33ba353",
            "licensedItem": {
               "id": "75151a68-fee2-436e-bfa7-3d9e5b94668d",
               "name": "CutXEnterprise",
               "displayName": "CutXEnterprise"
            },
            "licenseModelId": "1db0c182-70c4-4a51-8326-54ce29138303",
            "licenseModelName": "License_Model_for_Organization_License",
            "seatsTaken": 0,
            "seatsReserved": 0,
            "seatsTotal": 10,
            "seatCountCredits": [{
               "id": "d75a6e0c-23ee-4ce4-b77d-ec8b68a3fe91",
               "validFrom": "2023-02-19T14:12:22.012Z",
               "validUntil": "2024-02-19T14:12:22.012Z",
               "active": true,
               "licenseId": "48e04c21-1fae-4ddf-ab5a-e0644039c81e",
               "licenseTransactionItemId": "e0588c33-7055-4b28-8ec6-9e92c6f3b94f",
               "seatCount": 1,
               "seatsConsumed": 0
            }]
         }]
      }]
   }
}

Next steps

Authorize the organization’s users or device clients to consume the license. The license was created in the organization’s default entitlement, so add the users or device clients to a user or device client group that has access to that entitlement. (This can also be done in advance.) You can do this through the 10Duke Identity Management REST API or in the 10Duke SysAdmin tool.