Removing and installing a plugin's license can be done using the UPM REST API. This may be useful to automatically setup test or staging instances.

Remove a license

You can remove a plugin license by sending a DELETE request to https://your-instance/rest/plugins/1.0/<pluginkey>-key/license

It's important here to send application/vnd.atl.plugins+json in the content type header

For SAML SingleSignOn, this should look like this:

DELETE /rest/plugins/1.0/com.resolution.atlasplugins.samlsso.Jira-key/license HTTP/1.1
Content-Type: application/vnd.atl.plugins+json
Authorization: authorization
Host: your-instance.example.com
Connection: close
CODE


Install a license

To install a license, send a PUT request to https://your-instance/rest/plugins/1.0/<pluginkey>-key/license

It's important here to send application/vnd.atl.plugins+json in the content type header.

The request body should contain a JSON-String with rawLicense as key and the license string as value.

For SAML SingleSignOn, this should look like this:

PUT /rest/plugins/1.0/com.resolution.atlasplugins.samlsso.Jira-key/license HTTP/1.1
Content-Type: application/vnd.atl.plugins+json
Authorization: authorization
Host: your-instance.example.com
Connection: close
Content-Length: 706

{"rawLicense":"AAABzw0ODAoPeNqVklFv2jAQx9/[...]g4mDhik/ZOwLd5TBX02m2"}
CODE


Sending this request containing a license key that is already installed will result in a error 400 response with subcode upm.plugin.license.error.invalid.update. To avoid this, uninstall the license using the DELETE request first.