Zentitle2 Licensing API (2024-11-07:v1.0.814)

Download OpenAPI specification:Download

Overview

This is the documentation for the Zentitle2 Software Licensing Platform for SaaS and On-Premise applications.

Please provide feedback to your account manager on things you like and things you'd like to see.

Authentication

Licensing API doesn't use OAuth2 to authenticate requests. Instead, authentication is based on tenantId, productId, and entitlement Activation Code.

The first step to use the Licensing API is to call Activate endpoint. In the response, one of the fields is accessToken. Access token should be sent with every API request in the Authorization header as:

Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...

API requires one more header to be set with the ID of your Zentitle2 tenant, for example:

N-TenantId: t_KRwhRp1yl0_9gsZjE5Yjaw

Nonce

API is using a nonce concept. Every request must contain a unique nonce value in the N-Nonce header. The following endpoints are not using Nonce:

  • Create Activation- this is the first call in the Activation lifecycle, so there is no Nonce value yet
  • Deactivate Seat - Nonce is not required to deactivate a seat. Otherwise, deactivating would be impossible in case of a lost or incorrect Nonce value.

The first Nonce is returned by the Create Activation endpoint. This Nonce must be stored by the application and used in subsequent requests, returning a new nonce for the following request. Nonce values are produced in the N-Nonce header.

Postman Configuration

It's straightforward to set up Postman to use with Zentitle2 Licensing API.

Download OpenAPI specification

You will find a Download button at the top of this page, which will download the OpenAPI specification file.

Postman import

Open Postman and click the Import button (top left). Select the downloaded file, choose "Open API 3.0 with a Postman Collection", and click the Import button.

Postman configuration

Select the imported API and the collection "Zentitle2 Licensing API" in the APIs section.

  1. In the Authorization tab, select "No Auth" type.
  2. In the "Pre-request Script" tab, add the following script:
pm.environment.set("baseUrl", pm.environment.get("licensingApiUrl"))
pm.request.headers.add({key: 'N-TenantId', value: pm.environment.get("tenantId") });

if (pm.request.url.path.toString() != "api,v1,activate") {
    pm.request.headers.add({key: 'N-Nonce', value: pm.environment.get("licensingApi-nonce") });
    pm.request.headers.add({key: 'Authorization', value: pm.environment.get("licensingapi-accesstoken") });
}
  1. In the "Post-request Script" tab, add the following script:
var nonce = pm.response.headers.get("N-Nonce");
if (nonce) {
    pm.environment.set("licensingApi-nonce", nonce);
}

if (pm.request.url.path.toString() == "api,v1,activate") {
    var res = pm.response.json();
    pm.environment.set('licensingapi-accesstoken', res.accessToken);
}

Postman environment variables

Go to the "Environments" section on the left and create a new Environment for your Zentitle2 account:

tenantId:           {your tenant id}
licensingApiUrl:    {api url}

The script will automatically set the base URL for the API and Tenant ID header for every request.

Test the API

Select the "Create activation" request. In the Body fill in the request model and click the "Send" button. This will create a new activation for your entitlement.

Responses

Status Meaning Description
200 OK Returned after successful GET requests. The body contains requested data
201 Created Returned after a successful POST request. The body contains created object
204 No Content Returned after successful PUT and DELETE requests. The body is empty

In case of an error, API returns the error status code along with ApiError object if applicable.

Errors

Status Meaning Description
400 Bad Request can not parse request body or parameters
401 Unauthorized missing or invalid access token
402 Request Failed parameters were valid, but the request failed
403 Forbidden insufficient permissions to perform request
404 Not Found requested resource has not been found
409 Conflict request conflicts with the current state
422 Unprocessable entity request parses correctly but fails validation
429 Too many requests too many requests hit the API too quickly
500, 502, 503, 504 Server errors something went wrong on Zentitle's end

Changelog

Please see API Versioning documentation for more information about our versioning strategy and how to select API version.

2024-11-07

POST /api/v1/activate endpoint returns 201 or 200

  • If the activation is created successfully, the response will contain a 201 status code.
  • If existing activation is re-used, the response will contain a 200 status code.
  • Previously, the response always contained a 201 status code and returned ActivationModel with less information.

POST /api/v1/activate endpoint returns richer ActivationStateModel instead of ActivationModel

  • The response now contains more information including Features and Attributes. There is no need to subsequently call GET /api/v1/activation to get the data because response body will be exactly the same.

PATCH /api/v1/activation endpoint returns 402 when activation cannot be extended beyond entitlement expiry

  • When activation lease expiry already equals entitlement expiry, next and any subsequent refreshes will fail with 402, since the activation cannot be extended beyond the entitlement expiry.
  • Previously, the response would succeed with 200 and unchanged activation would be returned.

PATCH /api/v1/activation endpoint returns richer ActivationStateModel instead of ActivationModel

  • The response now contains more information including Features and Attributes. There is no need to subsequently call GET /api/v1/activation to get the data because response body will be exactly the same.

PATCH /api/v1/activation/features/checkout now returns 200 and FeatureStateModel in the response

  • This is to return enough information about the feature change by executing the Checkout action so that there is no need to perform another call to GET /api/v1/activation
  • Previously, the status code was 204 and the response was empty

PATCH /api/v1/activation/features/return now returns 200 and FeatureStateModel in the response

  • This is to return enough information about the feature change by executing the Return action so that there is no need to perform another call to GET /api/v1/activation
  • Previously, the status code was 204 and the response was empty

PATCH /api/v1/activation/checkout REMOVED

PATCH /api/v1/activation/return REMOVED

2024-01-01

Initial release

Activate

Create activation

Activate entitlement for the provided seat id and create activation that can be used for feature management

Activation returned will be valid until the time specified in the leaseExpiry field. To continue using the seat it has to be refreshed using the refresh endpoint.

The return object contains a JWT token that can be used to authorize requests to the API.

If the activation is created successfully, the response will contain a 201 status code. If existing activation is re-used, the response will contain a 200 status code.

Authorizations:
Bearer
Request Body schema: application/json
required

Properties required to create activation

productId
required
string <ProductId>

Product id for activation

required
ActivationCredentialsModel (object)

Credentials required to activate the entitlement

One of
type
required
string (ActivationMethod)
code
required
string [ 1 .. 50 ] characters
seatId
required
string [ 1 .. 100 ] characters

Seat id

seatName
string or null <= 50 characters

Seat name (optional)

Responses

Response Schema: application/json
accessToken
string

Access Token for the LicensingAPI

ActivationStateModel (object)

Object representing Activation

One of
id
string <ActivationId>

Activation identifier

ActivationMode (string)

Activation mode

One of
string (ActivationMode)
Enum: "online" "offline"

Activation mode

ActivationMethod (string)

Activation method

One of
string (ActivationMethod)
Enum: "activationCode" "openIdToken" "password"

Activation method

username
string or null

Username

leaseExpiry
string <date-time>

Exclusive seat lease expiry date

productId
string or null <ProductId>

Id of product licensed by entitlement

entitlementId
string or null <EntitlementId>

Id of entitlement

entitlementExpiryDate
string or null <date-time>

Entitlement expiry date (null if not expires)

ConcurrencyMode (string)

Entitlement concurrency mode

One of
string (ConcurrencyMode)
Enum: "concurrent" "nodeLock"

Entitlement concurrency mode

seatId
string

Unique id of seat provided by external system

seatName
string or null

Optional name of seat provided by external system

activated
string <date-time>

Activation creation date

lastLease
string <date-time>

Date when activation was created/last extended

Array of objects (AttributeStateModel)

Array of activation attributes

Array
key
string

Attribute key

AttributeType (string)

Attribute type

value
string or null

Attribute value

Array of objects (FeatureStateModel)

Array of activation features

Array
key
string

Feature key

FeatureType (string)

Feature type

active
integer or null <int64>

Amount of feature being currently checked out by activation

available
integer or null <int64>

Amount of feature that is still available for checkout (amount form active filed is excluded)

total
integer or null <int64>

Total amount of feature in entitlement

entitlementGracePeriodExpiry
string or null <date-time>

Entitlement grace period expiry date (null if not used)

(EntitlementStatus (string or null))

Entitlement status

One of
string or null (EntitlementStatus)
Enum: "active" "gracePeriod" "expired" "disabled" "exported" "created" "customerDisabled"

Entitlement status

hasMaintenance
boolean

Indicates if entitlement has maintenance

maintenanceExpiryDate
string or null <date-time>

Maintenance expiry date

lingerExpiry
string or null <date-time>

Date until this seat cannot be reused

ActivationStatus (string)

Activation status

One of
string (ActivationStatus)
Enum: "active" "linger" "leaseExpired"

Activation status

Request samples

Content type
application/json
{
  • "productId": "prod_LDkrrHUrMU2epyi3CuWWhg",
  • "activationCredentials": {
    },
  • "seatId": "john.doe@elevate.com",
  • "seatName": "John Doe"
}

Response samples

Content type
application/json
{
  • "accessToken": "eyJhbGci...",
  • "activation": {
    }
}

Activation

Get activation state

Use this method to get current activation state from the Zentitle2 server. Return object will contain all the attributes and currently checked out features.

Authorizations:
Bearer

Responses

Response Schema: application/json
id
string <ActivationId>

Activation identifier

ActivationMode (string)

Activation mode

One of
string (ActivationMode)
Enum: "online" "offline"

Activation mode

ActivationMethod (string)

Activation method

One of
string (ActivationMethod)
Enum: "activationCode" "openIdToken" "password"

Activation method

username
string or null

Username

leaseExpiry
string <date-time>

Exclusive seat lease expiry date

productId
string or null <ProductId>

Id of product licensed by entitlement

entitlementId
string or null <EntitlementId>

Id of entitlement

entitlementExpiryDate
string or null <date-time>

Entitlement expiry date (null if not expires)

ConcurrencyMode (string)

Entitlement concurrency mode

One of
string (ConcurrencyMode)
Enum: "concurrent" "nodeLock"

Entitlement concurrency mode

seatId
string

Unique id of seat provided by external system

seatName
string or null

Optional name of seat provided by external system

activated
string <date-time>

Activation creation date

lastLease
string <date-time>

Date when activation was created/last extended

Array of objects (AttributeStateModel)

Array of activation attributes

Array
key
string

Attribute key

AttributeType (string)

Attribute type

value
string or null

Attribute value

Array of objects (FeatureStateModel)

Array of activation features

Array
key
string

Feature key

FeatureType (string)

Feature type

active
integer or null <int64>

Amount of feature being currently checked out by activation

available
integer or null <int64>

Amount of feature that is still available for checkout (amount form active filed is excluded)

total
integer or null <int64>

Total amount of feature in entitlement

entitlementGracePeriodExpiry
string or null <date-time>

Entitlement grace period expiry date (null if not used)

(EntitlementStatus (string or null))

Entitlement status

One of
string or null (EntitlementStatus)
Enum: "active" "gracePeriod" "expired" "disabled" "exported" "created" "customerDisabled"

Entitlement status

hasMaintenance
boolean

Indicates if entitlement has maintenance

maintenanceExpiryDate
string or null <date-time>

Maintenance expiry date

lingerExpiry
string or null <date-time>

Date until this seat cannot be reused

ActivationStatus (string)

Activation status

One of
string (ActivationStatus)
Enum: "active" "linger" "leaseExpired"

Activation status

Response samples

Content type
application/json
{
  • "id": "act_oH_hPJ3BgE0LTRYd9-k1tg",
  • "mode": "online",
  • "activationMethod": "activationCode",
  • "username": "boeing_user",
  • "leaseExpiry": "2019-08-24T14:15:22Z",
  • "productId": "prod_oH_hPJ3BgEO187Yd9-kuTg",
  • "entitlementId": "ent_oH_hPJ3BgEO172Yd9-KuTg",
  • "entitlementExpiryDate": "2019-08-24T14:15:22Z",
  • "entitlementConcurrencyMode": "concurrent",
  • "seatId": "user@boeing.com",
  • "seatName": "Boeing User",
  • "activated": "2019-08-24T14:15:22Z",
  • "lastLease": "2019-08-24T14:15:22Z",
  • "attributes": [
    ],
  • "features": [
    ],
  • "entitlementGracePeriodExpiry": "2019-08-24T14:15:22Z",
  • "entitlementStatus": "active",
  • "hasMaintenance": true,
  • "maintenanceExpiryDate": "2019-08-24T14:15:22Z",
  • "lingerExpiry": "2019-08-24T14:15:22Z",
  • "status": "active"
}

Refresh seat activation

Refresh the seat to extend the activation lease time. When activation lease expiry already equals entitlement expiry, next and any subsequent refreshes will fail since the activation cannot be extended beyond the entitlement expiry.

Authorizations:
Bearer

Responses

Response Schema: application/json
accessToken
string

Access Token for the LicensingAPI

ActivationStateModel (object)

Object representing Activation

One of
id
string <ActivationId>

Activation identifier

ActivationMode (string)

Activation mode

One of
string (ActivationMode)
Enum: "online" "offline"

Activation mode

ActivationMethod (string)

Activation method

One of
string (ActivationMethod)
Enum: "activationCode" "openIdToken" "password"

Activation method

username
string or null

Username

leaseExpiry
string <date-time>

Exclusive seat lease expiry date

productId
string or null <ProductId>

Id of product licensed by entitlement

entitlementId
string or null <EntitlementId>

Id of entitlement

entitlementExpiryDate
string or null <date-time>

Entitlement expiry date (null if not expires)

ConcurrencyMode (string)

Entitlement concurrency mode

One of
string (ConcurrencyMode)
Enum: "concurrent" "nodeLock"

Entitlement concurrency mode

seatId
string

Unique id of seat provided by external system

seatName
string or null

Optional name of seat provided by external system

activated
string <date-time>

Activation creation date

lastLease
string <date-time>

Date when activation was created/last extended

Array of objects (AttributeStateModel)

Array of activation attributes

Array
key
string

Attribute key

AttributeType (string)

Attribute type

value
string or null

Attribute value

Array of objects (FeatureStateModel)

Array of activation features

Array
key
string

Feature key

FeatureType (string)

Feature type

active
integer or null <int64>

Amount of feature being currently checked out by activation

available
integer or null <int64>

Amount of feature that is still available for checkout (amount form active filed is excluded)

total
integer or null <int64>

Total amount of feature in entitlement

entitlementGracePeriodExpiry
string or null <date-time>

Entitlement grace period expiry date (null if not used)

(EntitlementStatus (string or null))

Entitlement status

One of
string or null (EntitlementStatus)
Enum: "active" "gracePeriod" "expired" "disabled" "exported" "created" "customerDisabled"

Entitlement status

hasMaintenance
boolean

Indicates if entitlement has maintenance

maintenanceExpiryDate
string or null <date-time>

Maintenance expiry date

lingerExpiry
string or null <date-time>

Date until this seat cannot be reused

ActivationStatus (string)

Activation status

One of
string (ActivationStatus)
Enum: "active" "linger" "leaseExpired"

Activation status

Response samples

Content type
application/json
{
  • "accessToken": "eyJhbGci...",
  • "activation": {
    }
}

Deactivate seat

Deactivate the seat and return all checked out features

Authorizations:
Bearer

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}

Get entitlement metadata associated with the current activation

Authorizations:
Bearer

Responses

Response Schema: application/json
customerName
string or null

Customer name

customerAccountRefId
string or null

Customer account reference id

orderRefId
string or null

Order reference number

offeringName
string

Offering name

sku
string

Unique offering identifier

productName
string

Product name

PlanModel (object)

Plan details

One of
name
string

Plan name

LicenseType (string)

License type

One of
string (LicenseType)
Enum: "subscription" "perpetual"

License type

LicenseStartType (string)

License start

One of
string (LicenseStartType)
Enum: "activation" "entitlementCreation" "custom" "manualActivation"

License start

Interval (object)

License duration

One of
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute"
count
integer or null [ 1 .. 32767 ]
Interval (object)

Grace period

One of
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute"
count
integer or null [ 1 .. 32767 ]
Interval (object)

Linger period

One of
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute"
count
integer or null [ 1 .. 32767 ]
Interval (object)

Lease period

One of
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute"
count
integer or null [ 1 .. 32767 ]
Interval (object)

Offline lease period

One of
type
required
string (IntervalType)
Enum: "none" "day" "week" "month" "year" "hour" "minute"
count
integer or null [ 1 .. 32767 ]
hasMaintenance
boolean

Indicates if entitlement has maintenance

maintenanceExpiryDate
string or null <date-time>

Maintenance expiry date

snapshotDate
string <date-time>

Date when the entitlement state has been captured

Response samples

Content type
application/json
{
  • "customerName": "Boeing Corporation",
  • "customerAccountRefId": "account12395-32",
  • "orderRefId": "order476-2547",
  • "offeringName": "Elevate Standard 1year subscription 1seat",
  • "sku": 1000,
  • "productName": "Elevate",
  • "plan": {
    },
  • "gracePeriod": {
    },
  • "lingerPeriod": {
    },
  • "leasePeriod": {
    },
  • "offlineLeasePeriod": {
    },
  • "hasMaintenance": true,
  • "maintenanceExpiryDate": "2019-08-24T14:15:22Z",
  • "snapshotDate": "2019-08-24T14:15:22Z"
}

ActivationFeatures

Checkout feature

This method checkouts feature. Feature can be used permanently (usage count) or can be returned (element pool) using return feature method.

Authorizations:
Bearer
Request Body schema: application/json
required

Properties required to checkout feature

key
required
string [ 1 .. 50 ] characters

Feature key

amount
required
integer <int64> [ 1 .. 9223372036854780000 ]

Amount to checkout

Responses

Response Schema: application/json
key
string

Feature key

FeatureType (string)

Feature type

One of
string (FeatureType)
Enum: "bool" "elementPool" "usageCount"

Feature type

active
integer or null <int64>

Amount of feature being currently checked out by activation

available
integer or null <int64>

Amount of feature that is still available for checkout (amount form active filed is excluded)

total
integer or null <int64>

Total amount of feature in entitlement

Request samples

Content type
application/json
{
  • "key": "Workers",
  • "amount": 1
}

Response samples

Content type
application/json
{
  • "key": "Workers",
  • "type": "elementPool",
  • "active": 1,
  • "available": 9,
  • "total": 10
}

Return feature

This method returns feature. Only element pool features are allowed to be returned

Authorizations:
Bearer
Request Body schema: application/json
required

Properties required to return feature

key
required
string [ 1 .. 50 ] characters

Feature key

amount
required
integer <int64> [ 1 .. 9223372036854780000 ]

Amount of feature to return

Responses

Response Schema: application/json
key
string

Feature key

FeatureType (string)

Feature type

One of
string (FeatureType)
Enum: "bool" "elementPool" "usageCount"

Feature type

active
integer or null <int64>

Amount of feature being currently checked out by activation

available
integer or null <int64>

Amount of feature that is still available for checkout (amount form active filed is excluded)

total
integer or null <int64>

Total amount of feature in entitlement

Request samples

Content type
application/json
{
  • "key": "Workers",
  • "amount": 1
}

Response samples

Content type
application/json
{
  • "key": "Workers",
  • "type": "elementPool",
  • "active": 1,
  • "available": 9,
  • "total": 10
}

Track feature usage

This method allows manual tracking of 'bool' (access control) feature usage

Authorizations:
Bearer
Request Body schema: application/json
required

Properties required to track the feature usage

key
required
string [ 1 .. 50 ] characters

Feature key

Responses

Request samples

Content type
application/json
{
  • "key": "Convert Video"
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "error": "string",
  • "errorCode": "string",
  • "validationErrors": [
    ]
}