Streamlining JIRA Instance: How to Extract Commercial Add-Ons


Today I had to update a zillion licenses of commercial add-ons in different instances. As being a lazy consultant who likes to use a command line instead of a mouse, I decided to check if I could use the UPM REST API to extract the information.

Ingredients for this recipe are a computer capable of running unix commands, curl (which is pretty standard on most unix distributions), and jq

Script :

# <baseurl> <userid> <passwd>
# use curl to retrieve all the addons from the UPM on the JIRA
# use jq to select only the addons which have properties .userInstalled and .usesLicensing
# for each result, access the UPM again to retrieve the license information
# and retrieve information using jq
curl -s --user $USERID:$PASSWD $BASEURL/rest/plugins/1.0/ | jq -r '.plugins | map(select(.userInstalled)) | map(select(.usesLicensing)) | .[] | (.key) ' |
while read -r line ; do
    curl -s --user $USERID:$PASSWD $BASEURL/rest/plugins/1.0/$line-key/license | jq -r '"(.pluginKey):(.contactEmail):(.supportEntitlementNumber):(.evaluation):(.maintenanceExpiryDateString)"'

How to use :

1. Create the script.

2. Execute the script.  Note that you need to use an account with administrator access.

sh francis mysecret


Are you still using multiple-issue trackers?
Check out Exalate – It’s an advanced issue synchronization solution that supports cross-organization issue tracking.
Its flexibility comes from the built-in groovy scripting capability, allowing it to implement almost any type of integration.

We hope this script will simplify your use of the tool. If you need any support, please contact us.


Subscribe to our newsletter to receive insights & events

    Related Articles