If you get '-1' in the response instead of the number of issues, it means that the response was sent before the count had been completed. Please try again in a moment.
POST /rest/issue/counts?{rough}&{sync}
Parameters:
Name
Type
Description
rough
Boolean
Calculate approximate counts.
sync
Boolean
Calculate counts synchronously.
note
Warning!
Setting this parameter true may influence YouTrack performance.
Sample
Request:
POST /rest/issue/counts
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<queries>
<query>#Resolved</query>
<query>#Unresolved</query>
</queries>