Limiting fields in JQL quesry result.

         I am trying to limit the fields that are returned from a JQL query and when using a URL in a rest call.

What is the syntax of the expression do I need to add to the end of a query to limit the fields returned?

status = Accepted & fields = key , ID  is one of many attempts that have failed. 

Thanks,

1 answer

0 vote

Hi Tom,

You can use the fields paramater as explained in the JIRA Server platform REST API reference:

The fields param (which can be specified multiple times) gives a comma-separated list of fields to include in the response. This can be used to retrieve a subset of fields. A particular field can be excluded by prefixing it with a minus.

By default, all (*all) fields are returned in this get-issue resource. Note: the default is different when doing a jql search -- the default there is just navigable fields (*navigable).

*all - include all fields
*navigable - include just navigable fields
summary,comment - include just the summary and comments
-comment - include everything except comments (the default is *all for get-issue)
*all,-comment - include everything except comments

 

Hopefully that helps!

Cheers,

Branden

Branden,  Thanks for the quick response.  I looked through the document and could not find information on how to implement the fields parameter, though there are many references to it.

In my example stated below, I am trying to create a query that returns the Key and ID fields of all Issues with an Accepted I tried many variations on the statement below.

status = Accepted & fields = key , ID   

Please advise.

Thanks,  Tom DelGiudice

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 21, 2018 in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

1,254 views 10 18
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