How to get all the tickets(maximum of 9000) exists in FD in single API call of ListAllTickets

According to the API document of Freshdesk APIs, There could maximum be 100 tickets returned in one API call of ListAllTickets.
If more than 100 tickets are present in FreshDesk , Let’s suppose 1000 tickets are there then there could be 10 API calls i will have to do to get all the tickets.
This will slow down our system, Can you please give any solution where we can get all the tickets in single API call irrespective of number of tickets.

1 Like

Hi Jibran,

You are correct. The maximum number of tickets that we can get in a single API response is 100, using the per_page=100 parameter. To get all the tickets, say 1000, we’ll have to use both per_page and page parameters to scroll through and get all the tickets.

I’m afraid we will have to make those 10 API calls and there isn’t a workaround.

3 Likes

@vaishnav
Hi Vaishnav,
Can i use filterTickets in place of ListAllTickets. Does filter tickets also have maximum no of tickets to 100 in one call? Please reply.

Hi @jibranWipro123,

Filter tickets API does not support per_page parameter and can paginate only upto a maximum of 10 pages using the page parameter. So the maximum number of tickets that we can get using this API would be 300.

Could you please elaborate your use case that requires to get all the tickets that are in the helpdesk?

Hi @vaishnav,

I am calling filterTickets API with page parameter in URL to get the data using page numbers.
https://telenormm.freshdesk.com/api/v2/search/tickets?query="custom_string:'9875467890'" &page=2

But I am getting illegal character error in my code. I tried giving unicode also for & character in the end but it is giving bad request error from API.
Can you please help me with the right syntax.
java.lang.IllegalArgumentException: Illegal character in query at index 99: https://telenormm.freshdesk.com/api/v2/search/tickets?query="custom_string:'9875467890'" &page=2