-
Suggestion
-
Resolution: Answered
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
Idea is that a user can issue a GET against:
http://example.com:8080/jira/rest/api/2/filter/count/
{id}This will return the number of issues which the filter returns.
A similar call exists in the SOAP API here: http://docs.atlassian.com/rpc-jira-plugin/4.4/com/atlassian/jira/rpc/soap/JiraSoapService.html#getIssueCountForFilter(java.lang.String
- relates to
-
JRACLOUD-29903 Add a rest call to return the total number of results from a filter
- Closed
You can accomplish this with the existing REST API (since 5.0).
Step 1: get the filter search URL
Go to the filter's REST address. For example:
GET https://jira.atlassian.com/rest/api/2/filter/12844
The searchUrl link is what you would use to see the search results.
Step 2: run the search with maxResults=0
Doing a GET on the searchUrl with maxResults=0 will simply return the result count.
GET https://jira.atlassian.com/rest/api/2/search?jql=project+%3D+10240+AND+issuetype+%3D+1+ORDER+BY+key+DESC&maxResults=0