Self-hosting a jira plugin and Universal Plugin Manager questions

I’m a novice plugin developer tasked with creating proprietary plugin that communicates with our commercial product. Our customer base is a small niche market so it really doesn’t make sense to put it on the Marketplace. The plan is to host it ourselves. We provide the customer a script that creates custom fields, marks a project as one of ours for the plugin, and so on via the REST API. The last step is to install (or upgrade) the plugin. This is where I’m missing something. There isn’t much documentation but what I found alludes to being able to self-host a plugin.

I get the upm-token but when I try to install the plugin via REST, I get a 415 error.

The json body is of the form:
{ "pluginUri" : "https://example.com/path/to/plugin.jar", "pluginName" : "Our Nifty Plugin" }

I also have a related question. Can the UPM detect that such a plugin has a newer version? If so, how do I provide that information along with instructing it how to get the update?

I don’t have experience with the UPM REST API, but I do want to offer you an alternative: you can actually put your app on the Atlassian Marketplace and keep it private. You will get a link to our version that customers can use to upload the JAR file to their instance. This JAR will be served from the Atlassian Marketplace, potentially offering your customers more confidence when installing the app.

I haven’t tried it, but it is also possible that this will allow the UPM to show updates as it will be able to check the Atlassian Marketplace for new versions available.

1 Like

Not a bad idea, thanks for the suggestion. I’ll run it through upper management and see how that goes.

Can the UPM detect that such a plugin has a newer version?

No, UPM doesn’t have any version handling logic internally, this is all handled by the Marketplace. UPM will query the Marketplace with information such as the current version of the plugin, plugin key, and the instance type (DC or Server) to which the Marketplace will return either nothing or the latest supported version of the plugin that is compatible with the host application.

As per the rest API, I’ll copy in @MagdalenaWieclawska as she may know this.

1 Like