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