Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Total param missing in /rest/api/2/search/jql response

vikeshpathania
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 5, 2025

Hi, 
As the /rest/api/2/search has been deprecated, it used to return a "total" in the response which tells total number of issues.

But in the new api /rest/api/2/search/jql no such value is returned in response. How can I get the total in the api response.

Thanks.

2 answers

2 votes
Kai Krause
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 5, 2025
1 vote
Jayesh
Contributor
October 6, 2025

Hello @vikeshpathania 

You can follow try the below option if that works

  • Use the new POST endpoint /rest/api/2/search/jql.
  • In the request body, include your JQL query and maxResults: 0 to avoid returning issues but still get the count.
  • The response will include a "total" field indicating the total number of matching issues.

Thanks
Jayesh R

Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2025

You can follow try the below option if that works

  • Use the new POST endpoint /rest/api/2/search/jql.
  • In the request body, include your JQL query and maxResults: 0 to avoid returning issues but still get the count.
  • The response will include a "total" field indicating the total number of matching issues.

In my opinion *, the information above, provided by @Jayesh  might not accurate, based on the available evidence.

May I kindly suggest @Jayesh , that if you were to make a request to that endpoint with that maxResult parameter and value in the request body, as you have suggested, you might get an error message which might be evidence that the information you provided might need to be reviewed?

May I kindly suggest @Jayesh , that if you refer to that endpoint's documentation, or to make a request to that endpoint with the maxResults parameter set to 0, you might find that it might not provide support for a response field called total, as you have suggested, which might be evidence that the information you provided might need to be reviewed?

 

* The information provided in this response represents the opinion of the writer only, and may or may not be true, factual or correct. The reader is advised to use appropriate discretion to determine if this information aligns with Their Truth.

Jayesh
Contributor
October 7, 2025

@Sunny Ape This is open for suggesstion and discussion forum, everyone can give the suggesstions and it can be right or wrong.

@Sunny Ape Don't try to be boss on everything, I gave my suggesstion if thats wrong you can suggesst rather than portraying yourself as the boss, You also don't know everything about atlassian, we are learning everyday so we will make mistakes.

Thanks

Jayesh R

Sunny Ape
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2025

I'm so sorry @Jayesh 

I have amended my original response to better align with Your Truth.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events