...
Expand | ||
---|---|---|
| ||
There are two methods which can be used to obtain the Iguana ID: see Programmatically obtain an Iguana ID |
Expand | ||
---|---|---|
| ||
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.
|
...
Code Block |
---|
## ---- 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; |
...