Forums

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

Unable to access Jira API via python

Rajesh kumar Mishra
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!
September 19, 2024

I need Help!!!

From past few days my Jira API calls from Python code is giving me connection error.

I am using basic auth using username and API token. I did try generating a new API token but no luck.

url = f"{JIRA_URL}/rest/api/2/search"
headers = {"Accept": "application/json"}
auth = HTTPBasicAuth(USERNAME, API_TOKEN)

2 answers

1 vote
Trudy Claspill
Community Champion
September 19, 2024

Hello @Rajesh kumar Mishra 

Welcome to the Atlassian community.

What exactly is the error you're getting?

 

Rajesh kumar Mishra
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!
September 19, 2024

Hi @Trudy Claspill , I am getting the below error.

Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x000001E2751BB390>:Failed to resolve 'SERVER ADDRESS' ([Errno 11001] getaddrinfo failed)

I did try opening the server address directly in the browser and it's opening without any issue.

0 votes
Alex Garcia
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!
February 10, 2025

Hi @Rajesh kumar Mishra , were you able to fix this? I am getting the same error. My script was working fine for many days until recently that this error pops up from time to time.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events