Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to install addon via UPM

Ghanshyam Joshi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 26, 2019
import requests
from requests.auth import HTTPBasicAuth
auth = HTTPBasicAuth('username','password')
url = 'http://localhost:2990/jira/rest/plugins/1.0?'
print(url)
# disable xsrf check
headers = {'X-Atlassian-Token':'no-check'}

#we first GET the URL to get the UPM Token
r = requests.get(url,auth=auth)
print(r.headers)
upm_token = r.headers.get('upm-token')
print(upm_token)
files = {'plugin': open('upraisepeople.server-1.0.8.jar','rb')}
requests.post(
# shove that UPM token at the end of the url
url+'?token='+upm_token,
files=files,
headers=headers,
auth=auth
)


I have above code for installing addon via python script but I cannot find upm-token in the headers. Any clue ..?

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
February 11, 2021

Suggest an answer

Log in or Sign up to answer