Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

API JQL search results provide way too much information

Sean M November 12, 2013

When I run a JQL search query through the REST API, I am getting a vast ocean of information -- every field available for every issue, which turns out to be over 150 fields per issue (and that is counting minimum elements per array, like fixVersion or subtasks).

While I know there is an "expand" parameter on the REST "search", it appears that there is either 1) a global setting that says "expand everything all the time" or 2) I am missing a way to limit what's returned to only the fields I need. Or I guess option 3 would be that I have no option to limit what I get back, and am going to just have to deal with the performance consequences.

Can anyone shed some light on this? Is this some sort of a setting specific to each filter?

Thanks for any and all help!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

10 votes
Answer accepted
Aleksander Mierzwicki
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2013

Have you tried using fields query parameter? https://docs.atlassian.com/jira/REST/latest/#d2e3181

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, only navigable (*navigable) fields are returned in this search resource. Note: the default is different in the get-issue resource -- the default there all fields (*all).

  • *all - include all fields
  • *navigable - include just navigable fields
  • summary,comment - include just the summary and comments
  • -description - include navigable fields except the description (the default is *navigable for search)
  • *all,-comment - include everything except comments
Sean M November 18, 2013

Wow, completely missed that in the documentation... embarrassing. Thanks very much.

Jimmy Elsayed January 4, 2018

The fields works for the outer fields only but I can not determine the inside fields, ex: when I get the issue data and I specify in "fields" to return "Status", it return a full status object. how can I return only the StatusId to minimize the network traffic?

Thanks, 

Like Victor Cheung likes this
Dave Paulson January 16, 2018

Jimmy Elsayed, did you ever get a response or figure out how to limit the attributes returned for an object? I'm stuck right now trying to achieve the same thing.

 

Thanks

Jimmy Elsayed January 17, 2018

I opened a case with Jira and It is not support!!

You have to use some add-on/plug-in to build your own RESTfull which is not applicable in my situation due to security considerations...

TAGS
AUG Leaders

Atlassian Community Events