I am trying to use jira-python to connect to the JIRA rest api.
options = {'server': 'https://<site>.atlassian.net'}
jira = JIRA(options, basic_auth=('username', ' pass'))
Inside the constructor for the JIRA object it ties to make a call to https://<site>.atlassian.net/rest/api/2/serverInfo which gets an AUTHORIZATION_FAILED (401) response.
Any suggestions on what I might be missing?
Hello Michael,
I have obfuscated the URL you have provided in the comment above.
Regarding on the issue you are experiencing, could you please attempt on running the following:
from jira import JIRA options = { 'server': 'https://<site>.atlassian.net' } jira = JIRA(options,basic_auth=('USERNAME', 'PASSWORD')) # Get an issue. issue = jira.issue('JRA-1234') print "Project Key: " + issue.fields.project.key # 'JRA' print "Issue type name: " + issue.fields.issuetype.name # 'New Feature' print "Reporter: " + issue.fields.reporter.displayName
Can you successfully cURL:
curl -k -u USERNAME -H "Content-type: application/json" -H "Accept: application/json" -X GET https://<site>.atlassian.net/rest/api/2/serverInfo
The URL in question does not require user's authentication.
—
Kind regards,
Rafael P. Sperafico
Ended up being PEBKAC. Got in this morning and saw the typo in the password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.