The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Uploading Plugin to atlassian jira via rest api

Natarajan_Amsaveni
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!
June 6, 2024

I am following this documentation - https://developer.atlassian.com/platform/marketplace/registering-apps/#installing-an-app-using-the-rest-api to upload my custom plugin through rest api call.

However its not getting uploaded, and i am getting 202 as response. 

One clarification i need regarding the jar file location- Can i keep my plugin jar in my local and give that location while hitting the post call ?

I am passing the below headers 

  1. Using the actual host name and port and path for your target Atlassian application.
  2. The token value should be the value of the upm-token header you just received. - yes 
  3. In the request, set the Accept header to: "application/json"
  4. Set the Content-Type for the data to: "application/vnd.atl.plugins.install.uri+json"
  5. In the body,

{ "pluginUri": "${plugin-xml-url}",

"pluginName": "the app name"

 

Here, in the plugin-xml-url, should i pass my jar file location ? or atlassian-plugin-xml location? if so, can i have my jar file in my local and give that location ?

 

Any help is highly appreciated ! Thanks in Advance !

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Dávid Lévai
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!
October 16, 2024

You should provide the "pluginUri" as the jar file location like so:
{"pluginUri": "file:/C:/your_plugin_name/target/name_of_jar.jar"}

At least for me, that worked. Here the uri is your local directory, where your plugin gets built i.e. the target directory after the maven build.