REST API get custom field values

Been searching quite a bit for a couple days and have not been able to get the values for a custom field (customfield-10040). Tried the following:

issue/createmeta?projectKeys=TEST&issuetypeIds=1&expand=projects.issuetypes.fields
issue/TEST-1/editmeta?expand=projects.issuetypes.fields
customFieldOption/10040
customFieldOption/customfield-10040

Some of these I get some data about the field (name, autoCompleteUrl, operations, schema, etc) but never the list of values that I can use. So how can I get an array of values for a custom field?

I've done this with SOAP but isn't that deprecated and plus I want to use one endpoint for all.

2 answers

1 accepted

0 vote

Fields returned by createmeta and editmeta should have an allowedvalues attribute in json.

Ah... looks like not all fields have allowedValues which is misleading maybe. We have a custom field that has selections for which Browser a bug is seen in. In our Jira site it shows a list of suggestions but the createmeta call doesn't show an allowedValues. But looking at another custom field it does have a list of allowedValues.

To get the suggestions that Jira site shows for the Browser custom field, is there an API to hit for it? Is that what 'labels/130370/suggest?query=abcd' is for? I don't see it in the REST API: https://docs.atlassian.com/jira/REST/latest/

What type of field is it? Also, are you seeing the options in the same project and for the same issuetype? If not, the context could be the issue.

is it possible to get customfield values from API where the return value for custom field is not in a format such as customfields_10000 rather the name that was assigned to in when created in JIRA?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

82 views 0 5
Read article

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