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.
Hi and Welcome ,
you can get the total via https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-approximate-count-post .
BR
Kai
Hello @vikeshpathania
You can follow try the below option if that works
Thanks
Jayesh R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm so sorry @Jayesh
I have amended my original response to better align with Your Truth.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.