Download OpenAPI specification:Download
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.
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
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:
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.
It's straightforward to set up Postman to use with Zentitle2 Licensing API.
You will find a Download button at the top of this page, which will download the OpenAPI specification file.
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.
Select the imported API and the collection "Zentitle2 Licensing API" in the APIs section.
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") });
}
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);
}
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.
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.
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.
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 |
Please see API Versioning documentation for more information about our versioning strategy and how to select API version.
GET /api/v1/activation
to get the data because response body will be exactly the same.GET /api/v1/activation
to get the data because response body will be exactly the same.GET /api/v1/activation
GET /api/v1/activation
Initial release
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.
Properties required to create activation
productId required | string <ProductId> Product id for activation | ||||
required | ActivationCredentialsModel (object) Credentials required to activate the entitlement | ||||
One of
| |||||
seatId required | string [ 1 .. 100 ] characters Seat id | ||||
seatName | string or null <= 50 characters Seat name (optional) |
accessToken | string Access Token for the LicensingAPI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ActivationStateModel (object) Object representing Activation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
|
{- "productId": "prod_LDkrrHUrMU2epyi3CuWWhg",
- "activationCredentials": {
- "code": "Y64E-GJQP-56EW-WEBG",
- "type": "activationCode"
}, - "seatId": "john.doe@elevate.com",
- "seatName": "John Doe"
}
{- "accessToken": "eyJhbGci...",
- "activation": {
- "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": [
- {
- "key": "Version",
- "type": "String",
- "value": "1.0.0"
}
], - "features": [
- {
- "key": "Workers",
- "type": "elementPool",
- "active": 1,
- "available": 9,
- "total": 10
}
], - "entitlementGracePeriodExpiry": "2019-08-24T14:15:22Z",
- "entitlementStatus": "active",
- "hasMaintenance": true,
- "maintenanceExpiryDate": "2019-08-24T14:15:22Z",
- "lingerExpiry": "2019-08-24T14:15:22Z",
- "status": "active"
}
}
Use this method to get current activation state from the Zentitle2 server. Return object will contain all the attributes and currently checked out features.
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
| |||||||||||
Array of objects (FeatureStateModel) Array of activation features | |||||||||||
Array
| |||||||||||
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 |
{- "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": [
- {
- "key": "Version",
- "type": "String",
- "value": "1.0.0"
}
], - "features": [
- {
- "key": "Workers",
- "type": "elementPool",
- "active": 1,
- "available": 9,
- "total": 10
}
], - "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 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.
accessToken | string Access Token for the LicensingAPI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ActivationStateModel (object) Object representing Activation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
One of
|
{- "accessToken": "eyJhbGci...",
- "activation": {
- "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": [
- {
- "key": "Version",
- "type": "String",
- "value": "1.0.0"
}
], - "features": [
- {
- "key": "Workers",
- "type": "elementPool",
- "active": 1,
- "available": 9,
- "total": 10
}
], - "entitlementGracePeriodExpiry": "2019-08-24T14:15:22Z",
- "entitlementStatus": "active",
- "hasMaintenance": true,
- "maintenanceExpiryDate": "2019-08-24T14:15:22Z",
- "lingerExpiry": "2019-08-24T14:15:22Z",
- "status": "active"
}
}
Deactivate the seat and return all checked out features
{- "details": "string",
- "error": "string",
- "errorCode": "string",
- "validationErrors": [
- {
- "message": "string",
- "propertyName": "string",
- "code": "string"
}
]
}
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
| |||||||||||||||||||
Interval (object) Grace period | |||||||||||||||||||
One of
| |||||||||||||||||||
Interval (object) Linger period | |||||||||||||||||||
One of
| |||||||||||||||||||
Interval (object) Lease period | |||||||||||||||||||
One of
| |||||||||||||||||||
Interval (object) Offline lease period | |||||||||||||||||||
One of
| |||||||||||||||||||
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 |
{- "customerName": "Boeing Corporation",
- "customerAccountRefId": "account12395-32",
- "orderRefId": "order476-2547",
- "offeringName": "Elevate Standard 1year subscription 1seat",
- "sku": 1000,
- "productName": "Elevate",
- "plan": {
- "name": "1 year subscription",
- "licenseType": "subscription",
- "licenseStartType": "activation",
- "licenseDuration": {
- "type": "none",
- "count": 1
}
}, - "gracePeriod": {
- "type": "none",
- "count": 1
}, - "lingerPeriod": {
- "type": "none",
- "count": 1
}, - "leasePeriod": {
- "type": "none",
- "count": 1
}, - "offlineLeasePeriod": {
- "type": "none",
- "count": 1
}, - "hasMaintenance": true,
- "maintenanceExpiryDate": "2019-08-24T14:15:22Z",
- "snapshotDate": "2019-08-24T14:15:22Z"
}
This method checkouts feature. Feature can be used permanently (usage count) or can be returned (element pool) using return feature method.
Properties required to checkout feature
key required | string [ 1 .. 50 ] characters Feature key |
amount required | integer <int64> [ 1 .. 9223372036854780000 ] Amount to checkout |
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 |
{- "key": "Workers",
- "amount": 1
}
{- "key": "Workers",
- "type": "elementPool",
- "active": 1,
- "available": 9,
- "total": 10
}
This method returns feature. Only element pool features are allowed to be returned
Properties required to return feature
key required | string [ 1 .. 50 ] characters Feature key |
amount required | integer <int64> [ 1 .. 9223372036854780000 ] Amount of feature to return |
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 |
{- "key": "Workers",
- "amount": 1
}
{- "key": "Workers",
- "type": "elementPool",
- "active": 1,
- "available": 9,
- "total": 10
}
This method allows manual tracking of 'bool' (access control) feature usage
Properties required to track the feature usage
key required | string [ 1 .. 50 ] characters Feature key |
{- "key": "Convert Video"
}
{- "details": "string",
- "error": "string",
- "errorCode": "string",
- "validationErrors": [
- {
- "message": "string",
- "propertyName": "string",
- "code": "string"
}
]
}