Forums

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

How to fetch all options from a Custom Field via JIRA REST API

Sai Avinash Duddupudi February 3, 2021

In my Jira namespace, while creating a ticket, there is a CustomField dropdown called Client which has some options as shown in the below image.

I am not able to find a way to fetch these options in the dropdown via JIRA REST API.

Can someone please suggest how to get it?


 

Bbv8mjW

3 answers

2 votes
Abdul Qadir
Contributor
May 15, 2023

@Sai Avinash Duddupudi do you find any solution for this problem? 

CloudOfPHP
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 25, 2025

If you want to get all the allowed values for a custom field, use the createmeta or editmeta methods. Here is an example resource:

/rest/api/2/issue/createmeta?projectKeys=YOURPROJECTKEY&issuetypeNames=Bug&expand=projects.issuetypes.fields

0 votes
CloudOfPHP
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 25, 2025

Use the createmeta methods. you will get allowed options for all custom fields.

REST API url : /rest/api/2/issue/createmeta?projectKeys=<PROJECT KEY>&issuetypeNames=Bug&expand=projects.issuetypes.fields

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.
February 3, 2021
Sai Avinash Duddupudi February 3, 2021

@Nic Brough -Adaptavist-   Thanks for the quick reply.

the id for the above client dropdown is customfield_12345

Can you pls tell how to retrive the fieldId and contextId so that I will use the same in the API call to fetch the field options?



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.
February 3, 2021

Same place, but the line above is "issue custom field contexts".  You might want to check "projects" in the same area.

Sai Avinash Duddupudi February 5, 2021

did not understand...... can you be more specific?

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.
February 5, 2021

You will need to use the custom field context calls, as documented in the link I gave, to get the context for the custom field you are querying the contents of.

Like jswaringen likes this

Suggest an answer

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

Atlassian Community Events