simple restapi call to get allowedValues from customfield_xxx

Hi All,

I am hitting a wall with the api calls and getting basic information back from a call.

when using
https://99xyz.atlassian.net/rest/api/2/issue/createmeta?projectKeys=PMO&issuetypeName=Bug&expand=projects.issuetypes.fields

part of the data returned is

public 'customfield_10602' => 
                        object(stdClass)[30]
                          public 'required' => boolean false
                          public 'schema' => 
                            object(stdClass)[31]
                              public 'type' => string 'string' (length=6)
                              public 'custom' => string 'com.atlassian.jira.plugin.system.customfieldtypes:select' (length=56)
                              public 'customId' => int 10602
                          public 'name' => string 'XX_ABC' (length=6)
                          public 'operations' => 
                            array (size=1)
                              0 => string 'set' (length=3)
                          public 'allowedValues' => 
                            array (size=5)
                              0 => 
                                object(stdClass)[32]
                                  public 'self' => string 'https://99xyz.atlassian.net/rest/api/2/customFieldOption/10509' (length=65)
                                  public 'value' => string 'Option 1' (length=31)
                                  public 'id' => string '10509' (length=5)
                              1 => 
                                object(stdClass)[33]
                                  public 'self' => string 'https://99xyz.atlassian.net/rest/api/2/customFieldOption/10510' (length=65)
                                  public 'value' => string 'Option Two' (length=28)
                                  public 'id' => string '10510' (length=5)

What call do I use to return just this data for the cutom field "XX_ABC" rather than use the full call above.

I am happy to call each customFieldOption, but how do I know what ones are associated with wjhat custom field?

thx

Art

1 answer

0 vote
Eddie Webb Community Champion Sep 22, 2013

The reason for the call requiring project and issue type is Field COnfiguration Schemes, which allow for distinct values for the same feild, depending on their context.

SO to get a list of values for a field you must use the call above.

thanks for the feedback Eddy,

I will leave this open for one more day incase anyone else has a hack.

appreciate it,

Art

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,314 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot