Forums

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

How to retrieve all options for this custom field visa REST?

Bijan Daei
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!
September 29, 2022

I have a field called "Team" in my project. In the UI when I want to set the value for this field it shows me a drop-down list that allows me to select one among the few options.

However, when I retrieve the issue using REST API I see the "id" of the selected option like this:

"customfield_12300": "345",
I tried getting all possible options for this field using "/rest/api/latest/issue/createmeta" endpoint which returns the following:
"customfield_12300": {
   "required"false,
   "schema": {
       "type""any",
       "custom""com.atlassian.teams:rm-teams-custom-field-team",
       "customId"12300
   },
   "name""Team",
   "fieldId""customfield_12300",
   "hasDefaultValue"false,
   "operations": [
       "set"
   ]
Can someone please help understand what this field actually is? Where are those dropdown options coming from?

1 answer

0 votes
Mohamed Benziane
Community Champion
September 30, 2022

Hi,

Welcome to the community

You need to use this API to get the option allowed for the customfield

/rest/api/2/issue/createmeta/{projectIdOrKey}/issuetypes/{issueTypeId}

https://docs.atlassian.com/software/jira/docs/api/REST/9.3.0/#api/2/issue-getCreateIssueMetaFields

Bijan Daei
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!
October 3, 2022

Thanks! I will try this.

Perumal Narendran
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 16, 2023

@Bijan did you got the expected output? If so how to achieve that?

Like Bijan Daei likes this

Suggest an answer

Log in or Sign up to answer