how would I retrieve all of the valid entries for the fixVersion field using the python API

I am building scripts that need to filter Jira based on the selections that are used in the FixVersion field.  I would like to create a list of all the valid entries from every porject that we have in Jira, is this possibel?

1 answer

This widget could not be displayed.
Gonchik Tsymzhitov Community Champion Oct 05, 2017

Hi 

May I know what do you mean under python API? 

Because I am preparing in my class methods for REST API e.g.

def getGroups(maxResults):
methods = '/rest/api/2/groups/picker'
parameter = '?maxResults=%s'%maxResults
url = configs.JIRA_BASEURL + methods + parameter
r = requests.get(url=url, auth=(configs.JIRA_USERNAME, configs.JIRA_PASSWORD))
groups = r.json()
return groups

Docs below: 

https://docs.atlassian.com/jira/REST/server/ 

About fixversions:

https://docs.atlassian.com/jira/REST/cloud/?_ga=2.110980293.1542717637.1507041534-1527655277.1500564154#api/2/project-getProjectVersions

 

For better testing and understanding I use this plugin from Atlassian

https://marketplace.atlassian.com/plugins/com.atlassian.labs.rest-api-browser/server/overview

it provides all public methods and you can find unpublic. 

 

 

Cheers, 

Gonchik Tsymzhitov

After that preparing method using packages requests, json.

 

I hope it is help for you.

yes, that was perfect, thank you.  I am not a programmer, and thought that I was looking for Python commands, but, I see now that the python scripts that I am updating are just sending rest, all makes perfect sense now.  Thanks again.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

573 views 25 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you