Getting complete list of all fields using JIRA REST Java Client

OmarA
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.
February 15, 2013

Hi guys,

I came across requirements that I need to get the complete list of all the fields in JIRA. As I understood, JIRA REST API is supporting now this method.

/rest/api/2/field

Which gives the ability to retrieve all the fields in JIRA (perhaps using JIRA admin right permission but I am not sure from this), indeed JIRA REST Java Client is not yet supporting it (or at least until now according to https://ecosystem.atlassian.net/browse/JRJC-127 which seems to be included in v2.0). However since v2.0 is not yet released, is there any applicable workaround to get all fields in JIRA until the final release in the sooner future?

Thanks a lot :).

P/S: I am building this plugin in plugin3 framework.

Cheers,

Omar

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

4 votes
Answer accepted
Sultan Maiyaki
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.
February 18, 2013

Hey Omar

You can make use of the createmeta API as described in http://docs.atlassian.com/jira/REST/latest/#id109124 You can expand it to show fields using something like http://localhost:8522/jira522/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields this will reurn the fields in JSON format with other info such as whether the field is required or hidden

TAGS
AUG Leaders

Atlassian Community Events