Our Licensing APIs are designed to interact with the Members Account licensing system allowing you to get, activate, and transfer Iguana licenses programmatically, providing you have access and licenses available to do so.
License Activation:
The following steps provide an example license activation workflow calling the Iguana license APIs using curl commands:
...
Expand |
---|
title | Option B: Use the IguanaX API to apply the license code to the target Iguana instance |
---|
|
Use your Iguana instance IP address and port: https://127.0.0.1:7654 Authenticate GET /session/login
To call the IguanaX APIs you must first login and get a session cookie from the response header to authenticate your subsequent requests. Parameters: Response Header: Code Block |
---|
| Content-Length: 128
Set-Cookie: IguanaSession-jYQGeQWk97ylKuP8AmEiad=z7WR4Xwzk51hXMP2e3WeZa; path=/; HttpOnly; SameSite=Strict |
Example curl command calling the /session/login API and parsing to retrieve Iguana session cookie the response header Set-Cookie to authenticate the next API call: Should look similar to: IguanaSession-jYQGeQWk97ylKuP8AmEiad=z7WR4Xwzk51hXMP2e3WeZa Code Block |
---|
| IguanaCookie=`curl -i -k -X GET "http://127.0.0.1:7654/session/login?username=<user>&password=<pass>" | grep -i 'Set-Cookie: ' | awk '{print $2}' | sed 's/;$//'` |
Apply the license codePOST /license/set
This API method applies the registered license code to the Iguana instance and returns a JSON object containing the request success or failure. To authenticate, the obtained Cookie is provided in the header of the request. Parameters: Response: Code Block |
---|
| {
"data": {},
"success": true
} |
Example curl command calling the /license/set API to apply the license code and activate the Iguana instance: Code Block |
---|
| IguanaID=`curl -k --header "Cookie: $IguanaCookie" -X POST "http://127.0.0.1:7654/license/set?license=<LicenseCode>" |
|
License Transfer
The license transfer procedure contains similar steps as to the activation procedure.
Get the Iguana ID IDs of the old and new Iguana instance instances
Expand |
---|
title | See License Activation Step 1 for how to obtain the Iguana ID. |
---|
|
You can refer Refer to License Activation step 1 to review the options for how to obtain the Iguana ID. |
Call the Members Account Licensing APIs to register your Iguana ID to generate a license codetransfer a license from the old Iguana to the new Iguana instance
Expand |
---|
title | 2 a) Get an authentication token |
---|
|
Refer to License Activation step 2 a) to review how to get the Members Account authentication Token to use in subsequent requests. |
Expand |
---|
title | 2 b) Get the entitlement ID |
---|
|
Expand |
---|
title | 2 c) Gain access to the Activation ID of the current Iguana Instance. |
---|
|
Code Block |
---|
| --Used to find activation ID
local Activate = net.http.post{
url = "https://my.interfaceware.com/api",
parameters = {
product = 'Iguana',
token = AuthToken,
method = 'license.listActivations',
entitlementid = entitlement,
},
live = true
} |
|
Expand |
---|
title | 2 d) Gain access to the new code and transfer the new Iguana Instance. |
---|
|
Code Block |
local Activate2 = net.http.post{
url = "https://my.interfaceware.com/api",
parameters = {
product = 'Iguana',
token = AuthToken,
method = 'license.UpdateActivationInfo',
description = 'license description',
activationid = activation,
instance_id = iguanaID
},
live = true
}(license types) of your old Iguana instance |
|
Refer to License Activation step 2 b) to review how to get the license entitlements and capture the entitlement ID of the target license type. |
Expand |
---|
title | 2 c) Get the activation ID of the old Iguana instance |
---|
|
Members Account Licensing API base URL: https://my.interfaceware.com Get List of Activated Iguana Licenses POST /api This API method returns a JSON object containing all of the licenses activated under a particular entitlement ID (license type). Parameters: product: The product you want licenses for - IguanaX string token: Your authentication token string method: The API method license.listActivations string entitlementid: The ID of the license type you want to activate string
Response: Code Block |
---|
| {
"data": [
{
"log_search": "60",
"num_components": "50",
"description": "Test",
"code": "SGJKLGDSLMHKEM93493DSFDS9349019A63B5A04A44290E42BBE452D508",
"license_type": "IguanaX Test",
"country": "",
"license_expiry": "2025-03-06 21:26:00",
"date_modified": "2024-03-06 21:26:00",
"state": "",
"site": "",
"city": "",
"date_issued": "2024-03-06 00:00:00",
"last_modified_by": "Admin",
"tracking_id": "",
"activation_id": "34",
"instance_id": "AJ5K8QPHHPNNSLLC"
},
{
"log_search": "60",
"num_components": "50",
"description": "Old Iguana Instance",
"code": "3D83F6E6753820DCC509A6F75849B488SFSKJG3086B2D7AAEBF5D0E67D",
"license_type": "IguanaX Test",
"country": "",
"license_expiry": "2025-08-13 16:04:10",
"date_modified": "2024-08-13 16:04:10",
"state": "",
"site": "",
"city": "",
"date_issued": "2024-08-13 16:04:10",
"last_modified_by": "Admin",
"tracking_id": "",
"activation_id": "210",
"instance_id": "RPQC9TYWFHPGEDGT"
}
],
"status": "ok"
} |
Example curl command calling the API and parsing theresponse activation id of the old Iguana instance you want to transfer the license from: Code Block |
---|
| OldIguanaActivationID=`curl -k -X POST "https://my.interfaceware.com/api?method=license.listActivations&product=IguanaX&token=<IguanaToken>&entitlementid=<EntitlementID>" | jq -r --arg instanceId "$OldIguanaID" '.data[] | select(.instance_id == $instanceId) | .activation_id'` |
|
Expand |
---|
title | 2 d) Transfer the activation ID to the new Iguana Instance and capture the license code |
---|
|
Members Account Licensing API base URL: https://my.interfaceware.com Transfer a License POST /api This API method returns a JSON object containing the license information about the Iguana you've transferred the license to. This in Parameters: product: The product you want licenses for - IguanaX string token: Your authentication token string method: The API method license.updateActivationInfo string description: A description to pair with the license (test, prod, etc.) string activationid: The Activation ID of the Iguana you're transferring the license from string instanceid: The Iguana ID of the instance that you want to transfer the license to string
Response: Code Block |
---|
| {
"data": {
"log_search": "60",
"num_components": "50",
"description": "New IguanaX",
"code": "E33F6E672A5239A200F300SDSF23FF6E673C596E1322DC83379C3F63DC0446",
"license_type": "IguanaX Test",
"country": "",
"license_expiry": "2025-08-13 16:04:10",
"date_modified": "2024-08-13 18:57:29",
"state": "",
"site": "",
"city": "",
"date_issued": "2024-08-13 16:04:10",
"last_modified_by": "Admin",
"tracking_id": "",
"activation_id": "210",
"instance_id": "THSWPRHMUXTT7MRR"
},
"status": "ok"
} |
Example curl command calling the API and parsing the license code from the response: Code Block |
---|
| OldIguanaActivationID=`curl -k -X POST "https://my.interfaceware.com/api?method=license.UpdateActivationInfo&product=IguanaX&token=<IguanaToken>&description=<NewIguanaX>&activationid=<activationID>&instance_id=<newIguanaID>" | jq -r '.data.code'` |
|
Apply the license code to the new Iguana Instance
Expand |
---|
title | See License Activation Step 3 for how to apply a license code |
---|
|
You can refer Refer to License Activation step 3 to review the options for how to apply a the license code to the new Iguana instance. |