Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Get custom field values via REST?

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

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). 

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

 

thanks for the information,

 

lee

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
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you