REST API get custom field values

mitchellsimoens May 6, 2013

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.

3 answers

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
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 6, 2013

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

mitchellsimoens May 9, 2013

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/

Like Max likes this
Jobin Kuruvilla [Adaptavist]
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 9, 2013

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.

4 votes
uuuu September 24, 2013

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?

1 vote
Andrew Mainland April 4, 2020

I'm very shocked at the state jira's back end seems to be in. I see multiple types of calls to the backend and tons of companies looking for simple answers. I think Jira is very lucky to be where it is with code in this state.

Suggest an answer

Log in or Sign up to answer