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 votes
Accepted answer

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
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,187 views 5 10
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