Skip to main content
Question

Retrieve historical Ticket data

  • December 24, 2024
  • 3 replies
  • 90 views

estanicy
Apprentice
Forum|alt.badge.img

Hello,

I am having trouble retrieving historical ticket data, we have a lot of tickets that need to be retrieved for the whole 2024, but i am stuck in how to retrieve all of them. I have tried filtering and also using a “target_date” and a descending order from the latest ticket to the target date but i always get an error (mostly from reaching over the 300 pagination limit). I am trying this in python, can anyone help me on how to build a proper request for this?

 

Thanks

Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+3
  • Contributor
  • 35 replies
  • December 27, 2024
estanicy wrote:

Hello,

I am having trouble retrieving historical ticket data, we have a lot of tickets that need to be retrieved for the whole 2024, but i am stuck in how to retrieve all of them Mydearquotes. I have tried filtering and also using a “target_date” and a descending order from the latest ticket to the target date but i always get an error (mostly from reaching over the 300 pagination limit). I am trying this in python, can anyone help me on how to build a proper request for this?

 

Thanks

To retrieve all the tickets for 2024 without hitting the pagination limit, you can adjust your approach by breaking the request into smaller chunks. Instead of trying to fetch all tickets at once, try querying for smaller date ranges like monthly or weekly. Use the pagination parameters like page and per_page to iterate through the results. After retrieving one page of tickets, check if there are more pages and continue fetching until all tickets are retrieved. This way, you avoid exceeding the 300-item limit per request and can still gather the full data set for the year.


estanicy
Apprentice
Forum|alt.badge.img
  • Author
  • Apprentice
  • 1 reply
  • January 2, 2025
motaro wrote:
estanicy wrote:

Hello,

I am having trouble retrieving historical ticket data, we have a lot of tickets that need to be retrieved for the whole 2024, but i am stuck in how to retrieve all of them Mydearquotes. I have tried filtering and also using a “target_date” and a descending order from the latest ticket to the target date but i always get an error (mostly from reaching over the 300 pagination limit). I am trying this in python, can anyone help me on how to build a proper request for this?

 

Thanks

To retrieve all the tickets for 2024 without hitting the pagination limit, you can adjust your approach by breaking the request into smaller chunks. Instead of trying to fetch all tickets at once, try querying for smaller date ranges like monthly or weekly. Use the pagination parameters like page and per_page to iterate through the results. After retrieving one page of tickets, check if there are more pages and continue fetching until all tickets are retrieved. This way, you avoid exceeding the 300-item limit per request and can still gather the full data set for the year.

I am still unable to fetch data from a specific range that is filtered by created_at. Do you know how to correctly query the tickets with a created_at filter to specify a range?


fatimasmak
Community Debut
  • Community Debut
  • 1 reply
  • February 12, 2025

It sounds like you're running into an issue with the pagination limit when retrieving a large amount of historical ticket data. To resolve this, you may want to consider adjusting your request to handle pagination more effectively, especially if you're using an API with a 300-item limit per page.


Reply