Ticket count much lower than incremental export result | Community
Skip to main content

Ticket count much lower than incremental export result

  • July 24, 2023
  • 5 replies
  • 0 views

Bas11

Hello.

When I query the /api/v2/tickets/count end-point, it reports 48834 tickets.

When I add up all the tickets I get when I iterate over all the pages of /api/v2/incremental/tickets/cursor.json, it adds up to 212544.

What causes this difference? I already checked if ticket ids don't appear twice, or the "status" is "deleted", but this is not the case.

Any insight is much appreciated.

5 replies

Hi Bas,
 
The Count Tickets endpoint does not include archived tickets.  However, the Incremental Ticket Export does include archived tickets.  This might account for the difference you're seeing.

Bas11
  • Author
  • July 28, 2023

Thanks Christopher. Could it be that the count also does not include closed tickets? When I subtract the closed tickets from the number that I actually iterate over with using the cursor, the numbers do match up.


No problem.  The count will still include closed tickets as long as they have not yet been archived.  So if your account does not have any closed tickets that haven't been archived yet, the closed ticket total and the archived ticket total are the same number.

Bas11
  • Author
  • August 1, 2023

What I heard through other channels specifically is: "Count Ticket endpoint will exclude closed tickets that have been marked as closed for at least 120 days." 


Hi Bas,
 
That's correct, as the 120 day mark after closing is when closed tickets are archived.