Release a license lease

You can request the release of one or multiple license leases in a single request to the 10Duke License Consumption API endpoint /authz/.

Request

The request syntax (line breaks added for display purposes):

https://<host_name>/authz/[.jwt|.json|.txt]
   ?release
   &lease_id_1
   [&lease_id_2]
   [&lease_id_3]...

In host_name, enter the hostname of your 10Duke Enterprise deployment.

Replace the parameters in the URL with actual values. The <> notation is used for mandatory variables and [] for optional ones.

Include the authorization header in the request.

Path parameters

.jwt|.json|.txt: Define the format in which you want the response. If you don’t specify a format, plain text is used.

Query parameters

lease_id_N: The ID of the license lease to be released. You can provide multiple lease IDs in a single request.

Request example

For example, to request releasing one license lease, you can make an HTTP GET request like this that specifies the lease ID:

https://customer.10duke.net/authz/.json
   ?release
   &889e10a3-d6a5-49d1-8f0d-7a8df788d655

Response

This is an example JSON Web token (JWT) response to a successful request, where 889e10a3-d6a5-49d1-8f0d-7a8df788d655 is the lease ID (JSON Web token ID, JTI).

{
   "889e10a3-d6a5-49d1-8f0d-7a8df788d655": true,
   "iss": "https://customer.10duke.net",
   "sub": "9ee24fec-2c53-4171-9285-2c9934e5b559",
   "exp": 1675778502,
   "iat": 1675778502
}

The response contains the following fields:

  • iss: The URL of your 10Duke Enterprise deployment, the issuer of the token. Depending on your configuration, iss may specify the sub content instead and the sub field is not included.

  • sub: The ID of the end user’s user account or the unique ID of the client

  • exp: The time when the lease expires, based on the requested release. Depending on the license model, the expiry time may include a cooldown period.

  • iat: The time when the lease release was issued

Error response

When the license release fails, the API returns a response with HTTP status code 200 and a description of the error situation in the response body.

An example error response, where 889e10a3-d6a5-49d1-8f0d-7a8df788d655 is the lease ID:

{
   "889e10a3-d6a5-49d1-8f0d-7a8df788d655_errorKey":"notAuthorized",
   "889e10a3-d6a5-49d1-8f0d-7a8df788d655_errorTechnical":"No lease found by id 889e10a3-d6a5-49d1-8f0d-7a8df788d655",
   "889e10a3-d6a5-49d1-8f0d-7a8df788d655_errorCode":"noConsumptionFoundById",
   "iss":"9a29b82d-ca6d-4999-8445-ba36ad471e7e",
   "exp":1675778502,
   "iat":1675778502,
   "889e10a3-d6a5-49d1-8f0d-7a8df788d655_errorMessage":"Releasing lease 889e10a3-d6a5-49d1-8f0d-7a8df788d655 failed"
}

Error codes

Error code (errorCode) Description
noConsumptionFoundById A lease was not found by the lease ID provided.
releaseNotAllowed Release is prohibited by the license model.