info@10duke.com

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:

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.

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":"9a29b82d-ca6d-4999-8445-ba36ad471e7e",
    "exp":1675778502,
    "iat":1675778502
}

The response contains the following fields:

  • iss: The ID of the end user’s user account

  • 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.