The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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!
Community moderators have prevented the ability to post new answers.
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 fieldssummary,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
Wow, completely missed that in the documentation... embarrassing. Thanks very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone, Hope everyone is safe! A few months ago we posted an article sharing all the new articles and documentation that we, the AMER Jira Service Management team created. As mentioned ...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.