Community moderators have prevented the ability to post new answers.
Hi Vasiliy,
Take a look at the following documentation. Although this document is tailored for an Atlassian Connect add-on, the same API works for installing a Plugins 2 plugin (e.g. a .jar file) through UPM. In the final step, provide your .jar location instead of the ${plugin-xml-url} property.
https://developer.atlassian.com/display/AC/Registering+Add-ons#RegisteringAdd-ons-Registeringanadd-onusingtheRESTAPI ***edit, doc moved***
https://developer.atlassian.com/market/faqs/installing-an-add-on
Cheers,
Ben
As Ben mentioned, there is a REST API that allows to install plugins. Here's an example of how to use it on the command line (using basic auth):
url="http://admin:admin@localhost:2990/jira/rest/plugins/1.0/" token=$(curl -sI "$url?os_authType=basic" | grep upm-token | cut -d: -f2- | tr -d '[[:space:]]') curl -XPOST "$url?token=$token" -F plugin=@path-to-plugin.jar
Adjust url
and path-to-plugin.jar
as necessary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice idea to inject the token as such.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found Robin's command not working on cloud, but this one does work for AC addons:
url="https://<username>:<password>@<instancename>.atlassian.net/rest/plugins/1.0/"; token=$(curl -sI -H "Accept: application/vnd.atl.plugins.installed+json" "$url?os_authType=basic" | grep upm-token | cut -d: -f2- | tr -d '[[:space:]]'); curl -X POST -v -d '{ "pluginUri" : "<addon-base-url>/atlassian-connect.json"}' -H "Content-type: application/vnd.atl.plugins.remote.install+json" "$url?token=$token"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We wrapped this up into a Java based utility: https://github.com/BigBrassBand/installapp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using v7 of jira and had to exclude the `jira` portion of the URL:
url="http://admin:admin@localhost:2990/rest/plugins/1.0/"
Hope this helps someone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I'm able to install add-ons through the UPM GUI on our Confluence Server (non cloud).
We have a need to script the installation of a fair number of plugins - so without clicking through the web UI, and the REST API is the way to go.
All the add-ons we use are through the Marketplace (Gliffy, several Bob Swift add-ons, Balsamiq, Confiforms, etc).
The docs are not clear as to what I exactly need per add-on. Some mention just a URL to a plugin XML file which seems to end with atlassian-plugin.xml
.
Other docs mention doing a POST and uploading a JAR file via a form field - but in that case how do I get hold of the plugin JAR file (or URL)?
How can I achieve this?
Many thanks
Dick Visser
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know the discussion is a little old, but:
We released a plugin for Maven today to integrate the deployment of apps to Confluence (we have not tested this on any other Atlassian products, including JIRA) using the REST API.
The plugin is open source, licensed under the Apache License V2.
Please note that this is the first release and we are still pre-1.0. So expect some rough edges.
More on this release at Apptools Maven Plugin 0.8.0 or the plugin's website.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
https://developer.atlassian.com/market/faqs/installing-an-add-on
An article about "Installing an add-on using the REST API" is helpful.
Is there anyone who knows solution about "Uninstalling an add-on using the REST API"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This may help (note that it's not official API documentation at this time, just a HOWTO guide): https://ecosystem.atlassian.net/wiki/display/UPM/UPM+REST+API
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nick,
Thanks for your comment.
Unfortunately, that documentation does not provide information about uninstalling plugins.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I updated Nick's linked page to include uninstallation information.
Cheers,
Ben
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasily,
Yes, there is a UPM Rest API: https://ecosystem.atlassian.net/wiki/display/UPM/UPM+REST+API. However, I don't think it provides facility to install plugins to JIRA.
Basically, you should just be able to manage installed plugins: retrieve plugin details, enable/disable etc.
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Taiwo,
Thanks for your reply, looks like API doesn't support install/delete indeed.
The end problem I'm trying to solve is the following:
As plugin developer I'd like to launch different version of JIRA app in the cloud and then automate installation of new version of the plugin, run automated tests etc.
But now my idea seems to be ruined )) unless there is no any solution to install plugins remotely in any way.
Vasiliy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Taiwo,
I'm trying to installplugin through UPM API, I'm getting 403 error even though I have system admin access. However delete plugin works fine with same ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.