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:
upm-token
header you just received.application/json
"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.
So we have to make our private custom app to public then it will be uploaded to Jira via API?
can you please provide the required solution?
I found the pluginUri by using my web browsers developer tools and watching network activity when adding the plugin though the UPM web ui. ScriptRunner is
https://marketplace.atlassian.com/download/apps/6820/version/1002900
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see. Does this mean I have to first manually upload it through the GUI first?
Atlassian should have had much better documentation on this with clear examples.
It should have been much easier than this. I'll try what you did and see if it works.
Thanks for replying I appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If it's a UPM marketplace app, install it manually through the UPM marketplace web ui, following the above process to find the UPM marketplace url.
If it's a custom app, i.e. it is not hosted on the UPM marketplace, you will need to host the apps .jar file yourself. Then use the url of your .jar file for the pluginUri.
Glad i can help! I believe this is new functionality in the api, and they haven't gotten around to documenting it. I'm just glad we now have this functionality in the api!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am trying to upload my JAR file from postman client, where in the place of pluginuri, i am passing my jar file location, which is residing in my local. But i am gettin 202 as response, and the file is not getting uploaded. Not sure, where its going wrong. Can anyone guide me on this part !
Thanks in advance !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.