Using the following REST API, a license key can be set for an installation by providing its client_id and the license key to be set.
NOTE: This is an additional feature made available alongside the existing functionality of collecting the license key from the SDK integration, which remains unchanged and continues to function as expected. For more information, please refer to the corresponding SDK documentation (for example, Usage Intelligence 5.6.1 C++ for Windows SDK Developer Guide).
Authenticate
To authenticate with Usage Intelligence, follow the instructions in the Usage Intelligence Reporting API 3.0 Guide.
API to Set License Key
The user needs to have admin privileges on the product to set license key using this API.
API Endpoint
/v3/products/update-client/set-license-key/<product_id>
API Type
POST
Headers
Refer to the header requirements as per any POST API in the Usage Intelligence Reporting API 3.0 Guide.
JSON Input
{
"client_id": "Installation’s_client_id",
"license_key": "license_key_to_set"
}
Response Format
{
"license_key_status": “Status of the transaction: successful or relevant error if the request failed ",
"license_flags_status":"LICENSETYPE:7\nEXPIRED:1\nACTIVATED:1\nBLACKLISTED:1\nWHITELISTED:1"
”
}
Numeric Value of the LICENSETYPE
The numeric value of the LICENSETYPE indicates the following:
| License Type | Value |
|---|---|
| RUI_KEY_TYPE_UNCHANGED | -1 |
| RUI_KEY_TYPE_EVALUATION | 0 |
| RUI_KEY_TYPE_PURCHASED | 1 |
| RUI_KEY_TYPE_FREEWARE | 2 |
| RUI_KEY_TYPE_UNKNOWN | 3 |
| RUI_KEY_TYPE_NFR |
4 Key Type is Not For Resale |
| RUI_KEY_TYPE_CUSTOM1 |
5 |
| RUI_KEY_TYPE_CUSTOM2 |
6 |
| RUI_KEY_TYPE_CUSTOM3 |
7 |
Numeric Value of the Remaining Flags
The numeric value of the remaining flags (EXPIRED, ACTIVATED, BLACKLISTED, WHITELISTED) indicates the following:
| Value | Meaning |
|---|---|
| -1 | Value is unchanged. |
| 0 | False |
| 1 | True |
License type and flags will be set based on the License Key Registry Operation Mode: Client Managed, or Server Managed. For more information on the client and server modes, refer to Software License Usage Tracking - Part 3.
NOTE: The above documentation explains the operations that can be performed using Analytics SDK, but the definition of client and server mode remains the same even when setting license key utilizing this REST API.
Server Managed
Usually, keys are added to the registry either from the Usage Intelligence dashboard or using the V3 API.
Possible Scenarios
- License Key Already Exists in the Key Registry
If the existing key is set using the API, the license key will be set for the installation. The license type and status flag values will be copied to the installation as set in the key registry. - License Key Does Not Exist in the Key Registry
- Any key set using the API is added to the registry with the type as unknown and the remaining flags set to false.
- The same type and flags will be copied to the installation. If the type or flags in the key registry are changed in the future, future key set operations will use the changed type or flag values for the installation.
Client Managed
Usually, keys are auto collected from the installation through SDK syncs.
Possible Scenarios
- License Key Already Exists in the Key Registry
If the existing key is set using the API, the license key will be set for the installation, but with the license type as unknown and the remaining remaining flags set to false irrespective of values in the registry. - License Key Does Not Exist in the Key Registry
Any key set using the API will be added to the registry with the license type as unknown and the remaining flags set to false. The same type and flag values will be copied to the installation. If the type and flag values in the key registry are changed in the future, future key set operations will still use the type as unknown and flags as false. - Mixed Mode
- The individual type or flag set to server mode will exhibit the server mode behavior.
- The individual type or flag set to client mode will exhibit the client mode behavior.
CAUTION: Kindly review the documentation in detail. If feasible, consider evaluating this feature using a test product or by creating a new product and initiating the free trial. This approach will facilitate a comprehensive understanding prior to performing these operations in a production environment. Please ensure that all key set actions performed are documented with their corresponding outcomes for future reference.
Example: Server Managed Mode Where the License Key Set Using the API Exists in the Registry
- Open the License Key Registry page in the Usage Intelligence dashboard, and add a key named existing-key-added-in-registry-set-to-installation-1663160CB7A4DE-while-operating-in-server-mode and save it. “1663160CB7A4DE” is the client ID of an installation (open the Client Profile page to explore).
- Observe the following:
- License Type is set to Purchased.
- Activated is selected.
- Allowed is selected.
- The new license key is listed on the License Key Registry page:
- Sort keys by added date and observe:
- The key you just added is listed.
- The install count is 0.
- Next, use Postman to call the APIs.
- Observe the following:
- Authentication is performed on the first tab.
- Input is provided.
- License key settings are set to server mode as shown in the earlier image.
- Next, click Send.
- Observe the following:
- Response status is 200 OK.
- License key has been set successfully.
- Verify numerical values of the type and flags as mentioned in the document.
- (Whitelisted is also known as Allowed.)
- (Blacklisted is also known as Blocked.)
- Verify by fetching the client profile of the installation “1663160CB7A4DE” as shown below
- Refresh the License Key Registry and observe that the install count has been incremented by 1 for this license key.
Related Articles
REST API WSUUID but no API to get WSUUID 4Number of Views Flexnet Embedded License Servers REST APIs 19Number of Views Integrate Flexera One ITAM data with ReportsExecute REST API 22Number of Views Fix 500 Server Error when running command workflows via REST API 7Number of Views Certification and Authentication of REST API's 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Revenera Assistant
Case id: 00001065
Activity: Status change: 2 hours ago