Forums

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

How to retrieve in python via get api the customfield values and ids

Christelle SCHNELLER
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 2, 2026

Dear all , the customfield is a multiple choice arrayand I have a 404 error in get api.
currently, I'm using :

 

url = f"{jira._options['server']}/rest/api/3/customField/{field_id}/{type}"
where jira._options['server'] are right and working in 
response = jira._session.get(url)
    options_data = response.json()
    options = {
        opt["value"]: opt["id"]
        for opt in options_data.get("values", [])
        }
for the field " Impacted CMEMS product"  ( multiple chocies array) :
  • the url is :'https://cms-change.atlassian.net/rest/api/3/customField/customfield_10034/array'
  • the following error appears on the get : File "C:\Users\pname\workspace\jirapitbridge\src\import_excel_to_jira.py", line 384, in <module> jira.exceptions.JIRAError: JiraError HTTP 404 url: https://cms-change.atlassian.net/rest/api/3/customField/customfield_10034/array text: <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Oops, you&#39;ve found a dead link. - JIRA</title><link type='text/css' rel='stylesheet' href='/static-assets/metal-all.css' media='all'><script src='/static-assets/metal-all.js'></script><meta name="decorator" content="none" /></head><body class=" error-page error404"><script type="text/javascript">document.body.className += " js-enabled";</script><div id="page"><header id="header" role="banner"></header><!-- #header --><section id="content" role="main"><div class="aui-page-panel"><div class="aui-page-panel-inner"><section class="aui-page-panel-content lowerContent"><div id="error-state"><span class="error-type"></span><h1>Oops, you&#39;ve found a dead link.</h1><ul><li>Go back to the <a href="javascript&colon;window.history.back()">previous page</a></li><li>Go to the <a href="/secure/MyJiraHome.jspa">Home Page</a></li></ul></div></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- #content --><footer id="footer" role="contentinfo"><section class="footer-body">

    could you please have a look and give me explanation/ the right API get request. thanks a lot.
  • How to use this field when you  create issue in JIRA ( post API) . could you provide an example?
  • Many thanks. best regards. Christelle.

2 answers

0 votes
Christelle SCHNELLER
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 3, 2026

I resolve the issue   in python : 

jira = JIRA(
        server="https://XXXXXX.atlassian.net/",
        basic_auth=get_credential(),
        options={
            "auth_url": "/rest/api/3/myself",
        },
        validate=True,
    )
  meta = jira.editmeta(jira.issue("issueKey"))
 field_meta = meta["fields"].get("customfield_XXXX")

    if not field_meta or "allowedValues" not in field_meta:
        raise ValueError("No allowed value found for this field")

    result = [
        {"id": v.get("id"), "value": v.get("value")}
        for v in field_meta["allowedValues"]
    ]
    print (f"customfiedXXX ids, values": {result}")
0 votes
Marc -Devoteam-
Community Champion
February 2, 2026

Hi @Christelle SCHNELLER 

Welcome to the community.

There is no api endpoint on custom field with array keyword.

What is your requirement, what results do you want to be returned from the API?

If you want to set a custom field value on an update or create action, see API; 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues 

Suggest an answer

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

Atlassian Community Events