Installing app into cloud

I am following this guide Installing an app using the REST API.
I am trying to get upm-token with postman but instead I am getting Oops, you’ve found a dead link. - JIRA . If I am correct the I need to call it against hostname for example myjira.atlassian.net/jira/rest/plugins/1.0/?os_authType=basic ? And what about port as it is said in guide? Something is inconsistent here. Or should I call my localhost:8080? Both didn’t work. Sure, I didn’t forget about headers Accept header and Token authentication. The problem is probably in url.

As far as I understand, the documentation is written for server instances.

It should be possible to use that API to install cloud apps too, as that is how Atlassian Connect Express does it: (Code is here: Bitbucket) - specifically the registerUpm method
For cloud Jira, the context path should be empty (not /jira) which should make the url:
myjira.atlassian.net/rest/plugins/1.0/?os_authType=basic

For cloud confluence, you will need to add the /wiki context path.

I also note that for cloud the body of the second request will be slightly different than explained in that documentation, I think it should just be:

{"pluginUri":"<publicly accessible https address of your  atlassian-connect.json (or ngrok tunnel)>"}

I’m pretty sure the default port (443) will be correct.

2 Likes

Could I register in atlassian-connect json some webhook
to know when is done ? The same principle as aformentioned
webhook for jira server xml in manual reference.

EDIT: I think I have found, for others, REST body output contains
this

"self": "/rest/plugins/1.0/pending/3b659074-d4e4-4c14-8ac6-0419ee2a80e5"

where you can ask the status of installation.

1 Like