How to fetch, delete, update the license information for the 3rd party plugins/apps using Jira REST API

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

In this article, we will understand how we can perform below operations on 3rd party plugins via Jira's REST API, since these actions are not documented in the official REST API documentation:

  • Fetching the license related details

  • Deleting the license

  • Updating the license

Please note that the API endpoints mentioned in this article are undocumented and hence doesn't come under Atlassian support purview. Due to the same fact, it may so happen that they may stop working with subsequent Jira upgrades. Please exercise caution while implementing it and test it first in non-production environments before implementing the same for Jira Production instances. 

Solution

Users can make use of the below undocumented REST API end points to perform the said actions.

ℹ️ Note that for each of these End Points, it is necessary to use the authorization header so that the request is authenticated. Please refer to Authentication and authorization for more information about it.

Fetching the license related information

Make use of the REST API resource GET<JIRA_BASE-URL>/rest/plugins/1.0/installed-marketplace

Headers: Content-Type: application/json

This endpoint will provide list of all 3rd party apps available in the Jira instance.

The license key will be present in the value of the attribute rawLicense.

You can see below an example of output obtained by this end point, when using for the ScriptRunner add-on key:

Example of output

{

"links"

:{

"pac-details"

:

"/jira/

rest

/plugins/1.0/pac-details/com.onresolve.jira.groovy.groovyrunner/8.28.1"

,

"alternate"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key"

,

"marketplace-summary"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/marketplace/summary"

,

"plugin-summary"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/summary"

,

"plugin-icon"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/media/plugin-icon"

,

"post-install"

:

"

/jira/plugins/servlet/scriptrunner/unlicensed"

,

"manage"

:

"

/jira/plugins/servlet/upm?fragment=manage%2Fcom.onresolve.jira.groovy.groovyrunner"

,

"plugin-details"

:

"

/jira/plugins/servlet/upm?fragment=manage%2Fcom.onresolve.jira.groovy.groovyrunner"

,

"license"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license"

,

"update-license"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license"

,

"self"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner/marketplace"

,

"validate-downgrade"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license/validate-downgrade"

,

"vendor-feedback"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/vendor-feedback"

,

"license-callback"

:

"

/jira/plugins/servlet/upm/license/com.onresolve.jira.groovy.groovyrunner"

,

"plugin-logo"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/media/plugin-logo"

},

"key"

:

"com.onresolve.jira.groovy.groovyrunner"

,

"name"

:

"Adaptavist ScriptRunner

for

JIRA"

,

"licenseDetails"

:{

"links"

:{

"license"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license"

,

"update-license"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license"

,

"self"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license"

,

"alternate"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key"

,

"validate-downgrade"

:

"/jira/

rest

/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license/validate-downgrade"

,

"license-callback"

:

"jira

/plugins/servlet/upm/license/com.onresolve.jira.groovy.groovyrunner"

},

"pluginKey"

:

"com.onresolve.jira.groovy.groovyrunner"

,

"valid"

:

true

,

"evaluation"

:

false

,

"nearlyExpired"

:

false

,

"maintenanceExpiryDate"

:1748354400000,

"maintenanceExpired"

:

false

,

"licenseType"

:

"DEVELOPER"

,

"licenseTypeDescriptionKey"

:

"DEVELOPER"

,

"creationDateString"

:

"27/May/24"

,

"expiryDate"

:1748354400000,

"expiryDateString"

:

"27/May/25"

,

"rawLicense"

:

"\"

XXXXXXXXXXX ...

Deleting the license

Make use of the REST API resource DELETE/rest/plugins/1.0/<plugin_key>/license

Headers: Content-Type: application/vnd.atl.plugins+json

This call will empty the license section of the plugin whose plugin key is specified in the URL. To fetch the plugin keys, users can make use of the first GET <JIRA_BASE-URL>/rest/plugins/1.0/installed-marketplace call.

Please note that the above header is required, otherwise the API call will return HTTP 415 error response.

Updating the license

Make use of the REST API resource PUT/rest/plugins/1.0/<plugin_key>/license

Headers: Content-Type: application/vnd.atl.plugins+json

ℹ️ To update the license of the 3rd party plugin, please make sure to empty the license field first. It could be done via above API approach (Deleting the license) or via UI too. The important thing is to empty it first. If the license is not empty for the corresponding plugin, the API will return the HTTP 400 error with the below error response:

1 2 3 { "subCode": "upm.plugin.license.error.invalid.update" }

The above PUT call will update the license for the 3rd party app whose key is specified in the URL.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.