Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check JIRA REST API version?

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?

like image 322
Nikolai Golub Avatar asked Jan 16 '13 08:01

Nikolai Golub


1 Answers

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:

  • JIRA REST API Version 2 Tutorial
  • JIRA REST API documentation
  • If your stuck on the coding part, search Atlassian answers and SO or ask a question.
like image 172
Kuf Avatar answered Sep 28 '22 18:09

Kuf