According to the Atlassian documentation (https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-group-issue-search),the "/rest/api/3/search" endpoint is now deprecated. I’m migrating to the JQL-based version "/rest/api/3/search/jql", but I noticed that the total field is no longer included in the response.
/rest/api/3/search"
/rest/api/3/search/jql"
total
I came across a suggestion to set maxResults=0 (see https://confluence.atlassian.com/jirakb/find-the-total-number-of-work-items-in-jira-cloud-using-jql-or-issue-search-1319567658.html), but when I try that I get an error saying maxResults must be between 1 and 5000.
maxResults=0
maxResults
So how can I retrieve the total number of items for a search?
Hi @Cedric Moncade -- Welcome to the Atlassian Community!
Please try the endpoint for Count Issues Using JQL:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-approximate-count-post
Kind regards,Bill
Hi @Cedric Moncade
To save a bit of time. You need a POST and send that body. Put the JQL in between the "".
and thanks @Bill Sheboy !!
Regards
I am feeling so stupid, I was on this page all the afternoon and I didn't see it.Thank you both of you @Bill Sheboy @Aaron Pavez _ServiceRocket_
No worries, @Cedric Moncade -- We are all learning and the endpoint docs do not always make it simple to search for things we want.
It looks like you're new here. Sign in or register to get started.