Automating License Transfers

The following steps provide an example license transfer workflow using the license APIs:

  • The old Iguana ID refers to the Iguana instance you want to transfer a license from.

  • The new Iguana ID refers to the Iguana instance you wan to transfer the license to.

There are two methods which can be used to obtain the Iguana ID: see Programmatically get an Iguana ID

Use the Members Account Licensing APIs to transfer the license code from the old Iguana to the new Iguana instance:

  1. Authenticate: To make any license API calls, you must first login and get an authentication token.

  2. Get Available License IDs: Get a list of entitlements (license types) to obtain a license ID for the type of license you want to activate.

  3. Get a List of Activated Licenses: Obtain a list of all of the licenses activated under a particular entitlement ID (license type). In this list is an activation ID of the old Iguana you need to use to transfer your license to the new Iguana.

  4. Transfer the license: Transfer the activation ID to the new Iguana Instance and capture the license code to be applied.

There are two possible methods to apply the license code to the new Iguana instance: See Programmatically apply a License Code.

Try it yourself by modifying the below sample script. This is designed to help you build your own customized automation script. To implement, please provide the appropriate parameters for your use case:

The following sample script is for IguanaX v1.10.103

## ---- LICENSE TRANSFER ---- ## InterfacewareUser="<MembersAccountUsername>" InterfacewarePassword="<MembersAccountPassword>" LicenseName="<EntitlementName>" # STEP 1 - Get the Iguana ID IguanaID=`/home/iguanauser/iguana --id` echo "IguanaID: $IguanaID" # STEP 2 - Call Members Account API get activated license code: # Get Authentication Token IguanaToken=`curl -k -X POST "https://my.interfaceware.com/api?username=$InterfacewareUser&password=$InterfacewarePassword&method=session.login" | jq -r '.data.Token'` echo "IguanaToken: $IguanaToken" # Get EntitlementID of license type 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'` echo "EntitlementID: $EntitlementID" # Get the ActivationID of the old Iguana using IguanaID and EntitlementID 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'` echo "OldIguanaActivationID: $OldIguanaActivationID" # Transfer the old ActivationID to the new IguanaID NewLicenseCode=`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'` echo "NewLicenseCode: $NewLicenseCode" # STEP 3 - Write the IguanaLinceseCode to the IguanaLicense file in the working directory echo $NewLicenseCode > /home/iguanauser/.IguanaX/config/other/IguanaLicense;

Â