All,
I'm looking for a solution to update the plugin license, I learn below article which it can set the license for Jira software/servicedesk/core, it's very useful for me.
https://confluence.atlassian.com/jirakb/how-to-retrieve-application-license-details-or-set-the-license-via-private-rest-api-in-jira-7+-934728265.html?_ga=2.57725353.225961834.1588033245-1404324419.1573778045
I also would like the same way to update the plugin license, but I encounter an issue and got "upm.plugin.license.error.invalid.update".
How do I use the correct license name/field in the Request Body for the plugin? Do we have any related KB as this article?
REST APIrest/plugins/1.0/{pluginKey}/licenseMethodPUTParameterpluginKey: com.eazybi.jira.plugins.eazybi-jira-keyRequest Body{"licenseKey": xxx}
Response{"subCode": "upm.plugin.license.error.invalid.update"}
Thanks,Shirley
Hello, @Shirley Tsai.
You should use the following request body
{ "rawLicense":"license key here"}
and Content-Type: application/vnd.atl.plugins+json
Hi @Volodymyr Havryliuk
Thanks for the feedback. I'm glad of your reply. At the beginning, I'm were finding the way and it's so hard. Now, I already figure out how to use this REST API and implement it to update add-on licenses via Ansible playbook as well.
- name: Update the license of add-on uri: url: "https://{{ alias_name }}/jira/rest/plugins/1.0/{{ item.name }}-key/license" method: PUT user: account password: "{{ password}}" body: '{ "rawLicense":"{{ item.license }}"}' headers: Content-Type: "application/vnd.atl.plugins+json" body_format: json force_basic_auth: yes return_content: yes status_code: 200 with_items: - { name: '{{ pluginkeys[0] }}', license: '{{ licenses[0] }}' }
Hi,I also want to update plugin license by using REST API. But the result is :
"upm.plugin.license.error.invalid.license"
the method is :put
the URL is :
https://***/jira/rest/plugins/1.0/com.onresolve.jira.groovy.groovyrunner-key/license
Content-Type is : application/vnd.atl.plugins+json
{"rawLicense":"***“}
Diffierent from you my body is text,when i try to change the type to json ,the Content-Type will change .
could you help me?
Hi Chunyuan,
Do you use Curl command or REST API from Jira Admin? Could you provide your command?
It looks like you're new here. Sign in or register to get started.