I have several host licenses to update and i want to automate it. Getting license works without issues. Setting license does not work, returns response code 415 without any text.
Using python3.
Headers:
headers = {"Content-Type": "application/json", "Accept": "*", "Authorization": "Basic "+encoded} and the test get request:
response = requests.get(jira_base+"/rest/plugins/applications/1.0/installed/jira-software/license", headers=headers)
this works.
Setting the license does not. Using same headers and this is my request.
data = {
"licenseKey": "<MyLicenseKey>"
}
headers = {"Content-Type": "application/json", "Authorization": "Basic "+encoded}
response = requests.post(jira_base+"/rest/plugins/applications/1.0/installed/jira-software/license", headers=headers, data=json.dumps(data)) following this page: https://confluence.atlassian.com/jirakb/how-to-retrieve-application-license-details-or-set-the-license-via-private-rest-api-in-jira-7+-934728265.html
and i get <Response [415]> without any other info.