8

How to check, that rest api is enabled in JIRA and it has appropriate version?

I know, that it is possible to request 'api/latest', but if latest installed version isn't compatible with methods, that i call?

Nikolai Golub
  • 3,327
  • 4
  • 31
  • 61

3 Answers3

5

To check that it is enabled, (and to disable it if you wish), then you will need to go to the Administration panel of your instance and enable/disable it there. Specifically you need to go to:

Administration > General Configuration > Set Accept remote API calls to either On/Off

To check if REST api is enabled, just go to (change the URL to your own)

https://jira.atlassian.com/rest/api/2/user

and see if the page loads.

I don't think there is a way using the API to get the API version, but you can make the API calls and fallback in case of an error. The coding depends on what you are trying to achieve.

You can find more info about the REST API at:

Kuf
  • 17,318
  • 6
  • 67
  • 91
1

Use the /rest/serverInfo endpoint, e.g. /rest/api/2/serverInfo.

This should return a JSON string with JIRA version, e.g.

{
...
    "version": "8.x.x",
...
}
kenorb
  • 155,785
  • 88
  • 678
  • 743
0

View page source of Jira page and search version.

Sample output:

<meta name="application-name" content="JIRA" data-name="jira" data-version="7.9.2"><meta name="ajs-server-scheme" content="http">
ZygD
  • 22,092
  • 39
  • 79
  • 102