The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

access jira via lambda

Aashutosh Sharma
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!
June 22, 2022

Hi,

I have written a small code to access the jira projects through python.

I am using atlassian-python-api.
the code is working perfectly fine while running from pycharm, however when i try to run the same code via AWS lambda the output of the call is redirected to login.microsoft.com.


I have even tried using requests package and calling the jira rest api via following authentication mechanisms
1. by combining the username and apitoken and then using base64 encoding of the string

2. also by using the username and apitoken directly.

In both the situations it is transfering the call to microsoft authentication and returning a html code instead of json data.

Is there something i am missing while running the code from lambda?

Code:

from atlassian import Jira
jira = Jira( url='https://jira.companyurl', token=api_token)

for p in jira.projects():
print(p['name'])

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.