Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to install addon via UPM

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 ..?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Software

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,469 views 22 32
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you