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

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.

Suggest an answer

Log in or Sign up to answer