Getting fields in a screen scheme using JIRA Java Rest Client


Im curently using JIRA Java Rest CLient and i want to get all fields present in a screen ( linked to a screen scheme for example) . So to be clear, i have a screen named "myScreen" which contains fields and i want to get those fields using JIRA Java Rest Client.

Thanks in advance,


2 answers

1 accepted

1 vote
Accepted answer

Hello guys. I eventually found out the answer. I'm using , in fact, Jira Java Rest Client and i retrieve now all the fields linked to an issue type using the code below:

GetCreateIssueMetadataOptions  options = new GetCreateIssueMetadataOptionsBuilder()
         List myList=(List) restClient.getIssueClient().getCreateIssueMetadata(options, pm); // getting the issue creation metadata relatively to the project im searching for
        java.util.Iterator<CimProject> it1=myList.iterator();
        		List issueT=(List) c.getIssueTypes(); // getting the list of issue types linked to this project
        		java.util.Iterator<CimIssueType> it2=issueT.iterator();
            	while (it2.hasNext())
            		Map<String, CimFieldInfo> fieldList=issueType.getFields(); // getting the list of fields linked to each issue type 
            		for(Entry<String, CimFieldInfo> entry : fieldList.entrySet()) {
            		    String cle = entry.getKey();
            		    CimFieldInfo valeur = entry.getValue();


Hope i could help someone who's searching for the same thing and thank you all for your help.

2 votes

Hi Hamza,

I guess you can try to use REST API below to get the available fields:


Hope its helps.

Thanks, John

Hi John, thanks for your answer. can you just tell me how to use such querie in a java project for example?

The method is what John suggested. The above post only says how you can use Jersey to access methods from Java. You need to combine both.

No it actually didn't help. currently i can access issues usig jira java rest client. But my purpose is to have the list of the fields present in a screen that i did define. Im still strugling to find a method to do so.

Ok I'll try it and give you a feedback ASAP. Thanks to both of you .

I am looking exactly for such a code. I tried using above snippet but didnt work. any suggestions?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,016 views 4 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you