0

I have used the following sample python code to try and connect to the JIRA instance for our project.

options = {
'server': 'http://172.16.48.15:8080'
}
jira = JIRA(options=options, basic_auth=('<username>', '<password>'))

(I haven't attached the rest of the code since the issue occurs while trying to create an instance of JIRA) The 'username' and 'password' are the same that I use to access JIRA from a browser. After executing the above code I get the following error:

....The requested resource (/rest/api/2/serverInfo) is not available.....
http://172.16.48.15:8080/rest/api/2/serverInfo

Process finished with exit code 1

Can anybody please tell me what mistake am I making ? I have rights to access this server with my credentials. I can connect to JIRA using a browser. Any help will be appreciated.

Thanks M.H.

Mangesh H
  • 1
  • 1

2 Answers2

0

Your URL for the server param is likely incorrect. Try making sure that Jira is actually hosted at the root of 172.16.18.15:8080 .

  • Hi @duplicate_id ... Thanks for your reply! When I copy the URL "http://172.16.48.15:8080" in the browser, it redirects me to the URL "http://172.16.48.15:8080/secure/Dashboard.jspa" which is the dashboard page for my project. Shouldn't that mean that the JIRA instance is indeed hosted on the root of the URL that I provided ? – Mangesh H Oct 31 '14 at 10:18
0

Check if you can access http://172.16.48.15:8080/rest/api/2/serverInfo with your browser as well. Your path to the rest api might be different depending on your webserver and/or JIRA setup.

The URI structure is defined as in the Atlassian Documentation:

http://host:port/context/rest/api-name/api-version/resource-name
Christopher Graf
  • 1,929
  • 1
  • 17
  • 34