Forums

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

Trying to get the list of values for custom field present in JIRA

Rahul K R
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!
January 31, 2025

Am trying to list the values for custom field . I have access to view/select the list of values of that custom field. 

And I give this URL - 

# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests import json url = "https://mags.arisglobal.com/rest/api/3/field/customfield_10403/context/32098/option" # url = "https://mags.arisglobal.com/rest/api/3/customFieldOption/32098" auth_token = "xxx" headers = { "Authorization": f"Bearer {auth_token}", "Accept": "application/json" } response = requests.get( url, headers=headers ) def get_pretty_print(json_object): return json.dumps(json_object, sort_keys=True, indent=4, separators=(',', ': ')) if response.status_code == 200: print(get_pretty_print(response.text)) # print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))

 

It gave status code as 200 but returning html of logging page.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events