Question

Could'n get tickets using per_page

  • 3 March 2023
  • 5 replies
  • 360 views

Hello! I need to use pagination to get all open tickets from freshdesk, but it’s not working as expected when i try to use “per_page”:

api/v2/search/tickets?query="status:2" works fine, but don’t retrieve all results

 

If i use the “page” parameter, it work fine too. api/v2/search/tickets?query="status:2"&page=2

 

But if i try to use “per_page” parameter it doesn’t work. 

api/v2/search/tickets?query="status:2"&per_page=2

 

Can someone help me figuring out what i’m missing? Thanks

 

 


5 replies

Userlevel 5
Badge +5

Hi @andrewcruzr 

 

Greetings from Freshworks community! 

 

I understand that you are unable to use the Pagination query for the Filter Tickets API endpoint, kindly note that the Filter Tickets API will return 30 tickets per page by default and the per page query will not be supported in the Filter Tickets API endpoint. This is the reason the API endpoint you tried accessing did not return any value. 

 

I hope this clarifies your query. 

Hello! @jim.stephen 

 

Do you have any recommendations to retrieve more than 300 tickets using the Filter Tickets API? I've used the page query, but it's limited to page 10. It would be great if the response could include the total number of pages and allow us to go beyond page 10. Thanks!

It sounds like you're having trouble using pagination to get all open tickets from Freshdesk. Pagination helps organize large sets of data into smaller, more manageable pages.

When you use the "per_page" parameter, it's supposed to limit the number of results per page, but it's not working as expected. However, when you use the "page" parameter, it seems to work fine.

To solve this issue, you might want to check if there are any limitations on the number of results per page set by Freshdesk. It's possible that the value you're using for "per_page" exceeds this limit, causing it not to work properly.

You could also try adjusting your query to include both the "page" and "per_page" parameters together, like this:

api/v2/search/tickets?query="status:2"&per_page=10&page=1

This would fetch 10 tickets per page on the first page, and you can adjust the values as needed.

If the problem persists, reaching out to Freshdesk support for further assistance could be helpful. They might be able to provide insights or solutions specific to their platform.


 

It sounds like you're having trouble using pagination to get all open tickets from Freshdesk. Pagination helps organize large sets of data into smaller, more manageable pages.

When you use the "per_page" parameter, it's supposed to limit the number of results per page, but it's not working as expected. However, when you use the "page" parameter, it seems to work fine.

To solve this issue, you might want to check if there are any limitations on the number of results per page set by Freshdesk. It's possible that the value you're using for "per_page" exceeds this limit, causing it not to work properly.

You could also try adjusting your query to include both the "page" and "per_page" parameters together, like this:

api/v2/search/tickets?query="status:2"&per_page=10&page=1

This would fetch 10 tickets per page on the first page, and you can adjust the values as needed.

If the problem persists, reaching out to Freshdesk support for further assistance could be helpful. They might be able to provide insights or solutions specific to their platform.


 

 

Badge

Alison has given a better answer, My problem has been resolved.

Reply