Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 16

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

  1. Get the Iguana ID of your target Iguana instance

There are two methods which can be used to obtain the Iguana ID:

...

titleOption A: Use the --id command line flag

The Iguana ID can be obtained using the command line --id flag. If you need to target a unique working directory, you can optionally use --id --working_dir <working_directory> to point to a specific Iguana working directory and return the Iguana ID.

Windows:

Code Block
iguana --id --working_dir "C:\ProgramData\IguanaX"

...

Linux:

Code Block
./iguana --id

...

titleOption B: Use the IguanaX API to get license details

/license/get

  1. Call the Members Account Licensing APIs to register your Iguana ID to generate a license code

Expand
title1 - Get an authentication token

Members Account Licensing API base URL: https://my.interfaceware.com

Get an Authentication Token POST /api

This API method returns a JSON object containing a session token which will be used with the subsequent license API calls.

Parameters:

  • username: Your Members Account username string

  • password: Your Members Account password string

  • method: The API method session.login string

Response:

Code Block
languagejson
{
    "data": {
        "Token": "277DBB66C802BE3287207FFE120595EC",
        "Info": {
            "Permissions": {
                "LicenseTransfer": true,
                "TemporaryLicense": true,
                "LicenseRead": true,
                "FinancialRead": false,
                "LicenseWrite": true
            },
            "CompanyName": "Richard Wang - Client "
        }
    },
    "status": "ok"
}

Example curl command calling the API and parsing the Token from the response:

Code Block
languagebash
IguanaToken=`curl -k -X POST "https://my.interfaceware.com/api?username=$InterfacewareUser&password=$InterfacewarePassword&method=session.login" | jq -r '.data.Token'`
Expand
title2 - Get a list of entitlements (license types) and choose the license type to activate

Members Account Licensing API base URL: https://my.interfaceware.com

Get a List of Entitlements GET /api

This API method returns a JSON object containing a list of license types and select the ID for the type you want to activate.

Parameters:

  • product: The product you want licenses for - IguanaX string

  • token: Your authentication token string (from the first call)

  • method: The API method license.listentitlements string

Response:

Code Block
languagejson
{
    "data": [
        {
            "entitlements_total": "3",
            "name": "IguanaX Dev",
            "num_components": "50",
            "id": "1",
            "entitlements_used": "1",
            "license_expiry": "0",
            "log_search": "365"
        },
        {
            "entitlements_total": "3",
            "name": "IguanaX Test",
            "num_components": "50",
            "id": "2",
            "entitlements_used": "1",
            "license_expiry": "0",
            "log_search": "365"
        },
        {
            "entitlements_total": "3",
            "name": "Iguana X Prod",
            "num_components": "50",
            "id": "3",
            "entitlements_used": "1",
            "license_expiry": "0",
            "log_search": "365"
        },
    ],
    "status": "ok"
}

Example curl command calling the API and parsing the selected license entitlement id from the response:

Code Block
languagebash
LicenseName="IguanaX Test" #change to name of license type to activate
EntitlementID=`curl -k -X POST "https://my.interfaceware.com/api?method=license.listentitlements&product=IguanaX&token=$IguanaToken" | jq -r --arg name "$LicenseName" '.data[] | select(.name==$name) | .id'`

...

title3 - Register your Iguana ID to activate a license code

Members Account Licensing API base URL: https://my.interfaceware.com

...

This API method returns a JSON object containing the license description and activated license code.

Parameters:

  • product: The product you want licenses for - IguanaX string

  • token: Your authentication token string (from the first call)

  • method: The API method license.activate string

  • description: A description to pair with the license (test, prod, etc.) string

  • entitlementid: The ID of the license you want to activate string

  • instanceid: The Iguana ID of the instance that you want to apply the license to string

Response:

Code Block
languagejson
{
    "data": {
        "description": "Test",
        "code": "4492A1B5CDA25D79DFCC5DC3GHS4448B9D8A3CCC98",
        "license_expiry": "2025-08-13",
        "name": "IguanaX Test",
        "instanceid": "THSWPRHMUXTT7MRR",
        "log_search": 365,
        "num_components": 50
    },
    "status": "ok"

Example curl command calling the API and parsing the license code from the response:

Code Block
languagebash
IguanaLicenseCode=`curl -k -X POST "https://my.interfaceware.com/api?method=license.activate&product=IguanaX&token=$IguanaToken&description=IguanaLicense&entitlementid=$EntitlementID&instanceid=<IguanaID>" | jq -r '.data.code'`
  1. Apply the license code to the new Iguana instance

There are two possible methods to apply the generated license code to the new Iguana instance:

Expand
titleOption A: On the command line, write the license code to the IguanaLicense File

Windows:

Code Block
languagebash
echo %IguanaLicenseCode% > C:\ProgramData\IguanaX\IguanaLicense;

Linux:

Code Block
languagebash
echo $IguanaLicenseCode > /home/iguanauser/.IguanaX/IguanaLicense;
Expand
titleOption B: Use the IguanaX API to apply the license code to the target Iguana instance

/license/set API

License Transfer

Expand

See step 1 above in Activate a License for how to get the Iguana ID.

...

Gain access to the Iguana ID used to transfer to.

...

Obtain Authentication Token.

...

Gain Access to the Entitlement ID.

...

Gain access to the Activation ID of the current Iguana Instance.

...

Gain access to the new code and transfer the new Iguana Instance.

...