Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleOption 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

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

  • username: Your IguanaX instance username string

  • password: Your IguanaX instance password string

Response Header:

Code Block
languagebash
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
languagebash
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/;$//'`

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

  • license: the license code to be applied string

Response:

Code Block
languagejson
{
    "data": {},
    "success": true
}

Example curl command calling the /license/set API to apply the license code and activate the Iguana instance:

Code Block
languagebash
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.

...