I am following this document: https://developer.atlassian.com/platform/marketplace/registering-apps/
Though I can't seem to get it working.
I am able to get the token from the first get request but in the second request, I can't get it to work.
I am able to do this:
In your request:
- Again use the actual host name and port and path for your target Atlassian application.
- The token value should be the value of the
upm-token header you just received. - In the request, set the Accept header to: "
application/json" - Set the
Content-Type for the data to: "application/vnd.atl.plugins.install.uri+json"
On step 5, I'm asked to put "pluginUri": "${plugin-xml-url}" in the body.
Replace plugin-xml-url with the hosted location of your descriptor file
What kind of value is this? Anyone have an example? How do I locate this value?
Also no where does it ever mention, the actual .jar or .obr file I need to attach to upload.
I'm using python and this is what I have:
upload_headers = {
'Authorization': 'Basic XXXXXXXX',
'Content-Type': 'application/vnd.atl.plugins.install.uri+json',
'Accept': 'application/json'
}# file_location = location to .jar file
files = {
'file': open(file_location, 'rb')
}
# I've tried other urls like the one here but it doesn't seem to work either. https://community.atlassian.com/t5/Answers-Developer-Questions/Install-plugin-into-Jira-using-UPM-REST-API/qaq-p/486119
data = {
'pluginUri': jira_url + '/plugins/servlet/upm',
'pluginName': plugin_name
}
upload_url = jira_url + '/rest/plugins/1.0/?token=xxxxxxxxxxx'
upload_response = requests.post(upload_url,
files=files, data=data, headers=upload_headers)
Can someone help here? Thanks.