Search code examples
restjirajira-rest-java-api

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?


Solution

  • 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: