Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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

 STEP 1: Get the Iguana ID of your target Iguana instance

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

 STEP 2: Call the Members Account Licensing APIs to register your Iguana ID to generate a license code

Use the Members Account Licensing APIs to register the obtained Iguana ID to generate a new license code for the Iguana you wish to activate.

  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 an Activated License Code: Register your Iguana ID with the desired license type to generate an activated license code to apply to your Iguana instance.

 STEP 3: Apply the license code to the target Iguana instance

There are two possible methods to apply the generated 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:

## ---- LICENSE ACTIVATION ---- ##
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"

# Register IguanaID to activate the license code
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'`
echo "IguanaLicenseCode: $IguanaLicenseCode"

# STEP 3 - Write the IguanaLinceseCode to the IguanaLicense file in the working directory
echo $IguanaLicenseCode > /home/iguanauser/.IguanaX/IguanaLicense;

  • No labels