Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

unable to change the jira server location through python

venkata telasula
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 20, 2018

Hi guys,

I'm trying to use python to read few jiras to do some automated tasks etc..

Currently stuck with jira server location resolution issue:

my code:

from jira import JIRA

# Get the JIRA object
jira = JIRA('https://jira.projectname.net/browse/', basic_auth={'username', 'pwd'})

issue = jira.issue('ABCD-1234')
print issue.fields.project.key             # 'ABCD'
print issue.fields.issuetype.name          # 'New Feature'
print issue.fields.reporter.displayName    # 'username'

my Jira link:

https://jira.projectname.net/browse/ABCD-1234

 

my error:

Got recoverable error from GET https://jira.projectname.net/browse/rest/api/2/serverInfo, will retry [1/3] in 12.2934759738s. Err: 401

my Question/request:

how to change default rest api path that the script is adding? i just need it directly take the server location and append issue id to get the jira link. Any suggestions are appreciated.

 

 

1 answer

0 votes
Johan Soetens _Dumblefy_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 20, 2018

Hi,

you got an unauthorized error.

Can you try without the browse slug?

jira = JIRA('https://jira.projectname.net/', basic_auth={'username', 'pwd'})
venkata telasula
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 21, 2018

Hi Johan,

already tried without browse, the error is 

: Got recoverable error from GET https://jira.projectname.net/rest/api/2/serverInfo

So, I was trying to see how to change

JIRA_BASE_URL= '{server}/rest/{rest_path}/{rest_api_version}/{path}'

Please suggest if there is  way to change this JIRA_BASE_URL?

appreciate your response.

Ravi Kumar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2021

hi venkata, 

i am experiencing the same issue. 

did you get a resolution on this?

please share the solution.

regards,

ravi.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events