List of active products

Hi there,

so I have this Forge Jira app and I am currently trying to determine, if the instance also has Jira Service Management active.

My approach was to retrieve a list of available products (Jira, Jira Service Management, Confluence etc.), but I couldn’t find an API for this…

Any ideas how to do this?

Thanks in advance,
paul

@ppasler,

For the “flavors” of Jira, you can get all application roles using GET /rest/api/3/applicationrole to see which products are licensed and for how many users. Confluence would be much trickier because you have to install a separate app into Confluence anyway, which would mean, “There is a Confluence.”

1 Like

Hi Ian,
thank you very much - works like a charm!
Cheer, paul

1 Like

Oh noes… only calling this method from the browser works.

If I try this inside my Forge app (as admin), I’ll get a 403

{
  errorMessages: [
    'OAuth 2.0 is not enabled for method: GET /rest/api/3/applicationrole'
  ]
}

Any chance to get this fixed?

@ppasler,

Odd. I was pretty sure that worked inside Forge Apps. Can you try asApp()?

I tried both asUser (admin) and asApp, same result (403).

@ibuchanan could you find something out? Where can I ask for OAuth 2.0 support? Do you have an alternative approach?
Thanks in advance!

@ppasler,

I don’t have any alternatives. I recommend raising a bug with developer support:

1 Like

Hi @ppasler,

You can call

If you get a HTTP 200 then you have Service Desk, and if you get a HTTP 404, no guessing, but you don’t. You don’t need to be logged in for this to work either. I did this with just

curl --silent --verbose --request GET --url 'https://<sitename>.atlassian.net/rest/servicedeskapi/info'

and got the expected results.

You can do the same with

  • for Confluence → /wiki/rest/api/settings/systemInfo
  • for Jira → /rest/api/3/serverInfo

Hops this helps.

James.

1 Like

Hi James,

thanks for the hint, this also works within a Forge app!

Cheers,
paul