How do I find options available for a field?

Guy Matz October 28, 2016

Is it possible to find the options available for a field?  It seems like this should work:

https://docs.atlassian.com/jira/REST/cloud/#api/2/field/{fieldKey}/option-getAllOptions

 

But it doesn't seem to . . .

Thanks!

1 answer

0 votes
Peter Geshev
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.
October 28, 2016

Hi Guy,

You can try the JQL autocomplete REST end point using the name of the field. 

Regards,

Peter

Guy Matz November 4, 2016

Thanks!  This would be good if it returned the IDs for the fields . . .

$ curl -s  https://example.jira.com/rest/api/2/jql/autocompletedata/suggestions?fieldName=Risk | jq '.'
{
  "results": [
    {
      "displayName": "High",
      "value": "High"
    },
    {
      "displayName": "Low",
      "value": "Low"
    },
    {
      "displayName": "Medium",
      "value": "Medium"
    }
  ]
}

 

I need a convenient way to get the IDs . . .  sad  Thanks, though!!

Konrad Garus February 12, 2018

Unfortunately, jql/autocompletedata seems to be ordered alphabetically, not following field configuration.

Suggest an answer

Log in or Sign up to answer