Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get custom field values via REST?

Lee Franke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2018

I can do a GET to a URL and retrieve all of the createmeta values.

/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields&projectKeys=PSS

In our case it returns almost 18k lines of JSON. I would prefer to only get the allowed values for a specific custom field.

So a URL of something like this:

/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields&projectKeys=PSS&field=customfield_10901

That would only return the information regarding that one specific field.

Is this currently possible?

 

thanks,

 

lee

2 answers

1 accepted

1 vote
Answer accepted
Tuncay Senturk _Snapbytes_
Community Champion
July 13, 2018

Hello Lee,

Do you mean to get select custom field options via REST? There is no such feature to get a single custom field option.

Besides, the json you aforementioned returns all values including enabled and disabled, and it does not have indicator so you can not know whether the option is enabled or not.

There is an open ticket in Jira for this one.

Anyway, there is no out-of-box solution yet. However Enhancer Plugin has custom field options REST service which gives only the options of a select custom field for given context (project, issue type). 

Lee Franke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2018

Well that's unfortunate. I was hoping I was doing something wrong or couldn't find the right documentation.

 

thanks for the information,

 

lee

0 votes
Support REST Extender _Groupnet_ December 3, 2021

Alternative to the suggestion from Tuncay you can:

  • write your own plugin that offers a new endpoint. A good starting point for this is: Tutorials and giudes. Then you need to find the right JIRA API methods.
  • try out the 'REST Extender' from the marketplace, that offers more functions for custom field options (GET /rest/api-ext/1/customField/{id}/options)
  • try out the 'Script Runner' and build your own REST endpoint with Groovy

Note: I belong to the vendor's support of the 'REST Extender'.

Suggest an answer

Log in or Sign up to answer