Forums

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

Need to steps to connect Jira with Python

Alfredo Negrete
Contributor
January 4, 2022

I'm trying to connect python to Jira and I'm looking for the steps needed to create the connection. I'm using Jira Server.  

2 answers

0 votes
Pramodh M
Community Champion
January 7, 2022

Hi @Alfredo Negrete 

May I ask what's the need here?

If you are just going to make some calls and achieve automation use the Python wrapper here

https://atlassian-python-api.readthedocs.io

Thanks,
Pramodh

Alfredo Negrete
Contributor
January 7, 2022

We have a team wanting to use Python to interface with Jira and return back project information such as Stories, Bus, Tasks, etc...  So I'm trying to figure out set them up so they can access Jira securely with only accessing their data and no other project information besides what they have access to.

0 votes
Nic Brough -Adaptavist-
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.
January 4, 2022

Your Python code should talk to Jira over the REST API

See https://developer.atlassian.com/server/jira/platform/rest-apis/ for what calls can be made into Jira, and I've got https://realpython.com/api-integration-in-python/ and https://www.nylas.com/blog/use-python-requests-module-rest-apis/ as stuff to read when I get to the point where I need to learn about consuming REST APIs in Python code.

Alfredo Negrete
Contributor
January 4, 2022

So based on this link(https://developer.atlassian.com/server/jira/platform/oauth/), I need to create an OAuthentication by installing Maven and OpenSSL on the server. Does that seem correct?

Nic Brough -Adaptavist-
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.
January 4, 2022

Maven is a build tool, you don't need it for a simple Oauth connection.  That page is about how to build and run the example Java code that can authenticate and then interact with Jira.

Nor are you looking at the (Jira) server here, the programs are to be installed on your development machine so you can build the client.

You'll want to use the same principles in your Python, not build a Java client.

Alfredo Negrete
Contributor
January 6, 2022

Based on the articles, you still need some type of authentication.  OAuth is the most secure that that means I need to generate the authentication token at the server...is that not correct?

Nic Brough -Adaptavist-
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.
January 7, 2022

Yes, your code should use an Oauth token to login as an authorised account.

You don't need maven or openssl to do that, Python can do it.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.20.1
TAGS
AUG Leaders

Atlassian Community Events