Forums

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

Rest Api for getting custom field(List Box)options

Prashant Mali
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.
May 18, 2018
I am getting data using get meta rest Api, but I want specific custom field data.

1 answer

1 vote
Danyal Iqbal
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.
May 18, 2018

which specific custom field data do you want? options?values?Please describe in detail?

Prashant Mali
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.
May 18, 2018

Custom field name : Single value selected List 

I want their all options with the help of API's

Danyal Iqbal
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.
May 18, 2018

the createmeta and editmeta endpoints contains an attribute for that. (but it is not there for all fields...its called allowedoptions or something similar ..)

Shaun S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 29, 2018

As Danyal mentioned, the options are present in the create/edit meta endpoints under the allowedValues section of the custom field.  I've included a snippet below of a single value select custom field that should look similar to your environment.

 

 "customfield_10501": {
"required": false,
"schema": {
"type": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
"customId": 10501
},
"name": "CustomList",
"operations": [
"set"
],
"allowedValues": [
{
"self": "http://jira.jirabox.com/rest/api/2/customFieldOption/10100",
"value": "Option 1",
"id": "10100"
},
{
"self": "http://jira.jirabox.com/rest/api/2/customFieldOption/10101",
"value": "Option 2",
"id": "10101"
},
Prashant Mali
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.
May 30, 2018

Thanks to both of you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events