Skip to main content

Hi. We’re trying to pull ticket data into our reporting/insights platform.

The main idea is to start with a simple last-updated date filter (e.g. 2024-12-01), then paginate as much as we can, then change the filter (e.g. 2024-12-01T15:30) to narrow the date range and collect a new set of pages.

I have two problems:

  • We have a ticket type for automated logging, which tends to be the vast majority of tickets. I don’t need to report on this, but it adds a lot of noise if I use the “v2/tickets” endpoint, because I can’t filter it by type.
  • Outside of automated logging, our ticket volume can be over 300 tickets per day, and “v2/search/tickets” can’t filter updated-at by timestamp, only by date. There’s no way to use that endpoint for this pagination approach.

So I can’t have both type-filtering and timestamp-filtering in the same endpoint. Right now, I’m just using the “v2/tickets” endpoint and discarding anything for the unwanted type, but this still results in a lot of unneeded API calls. We could go for three or four pages and only get a handful of non-automated tickets, so this approach is wasteful.

Is there something I’m missing, or something undocumented, that could make this work?

According to this you can filter by type https://developers.freshdesk.com/api/#filter_tickets

It also say you can use tags and custom fields. 

Or I’m missing something? 


Hi ​@JBH ABCIS,

Greetings from Freshworks Community!

There are a few filters that are supported on “List All Tickets” API and Type isn’t one of the parameters. For retriveing tickets based on Type or Tags, you can go with Filter Tickets API as mentioned by Daniel.

Filter Ticket API: https://developer.freshdesk.com/api/#filter_tickets

The following are the parameters supported:

Supported Ticket Fields

Field Type Description
agent_id integer ID of the agent to whom the ticket has been assigned
group_id integer ID of the group to which the ticket has been assigned
priority integer Priority of the ticket
status integer Status of the ticket
tag string Tag that has been associated to the tickets
type string Type of issue that has been associated to the tickets
due_by date Date (YYYY-MM-DD) when the ticket is due to be resolved
fr_due_by date Date (YYYY-MM-DD) when the first response is due
created_at date Ticket creation date (YYYY-MM-DD)
updated_at date Date (YYYY-MM-DD) when the ticket was last updated
Custom Fields
Single line text string
Number integer
Checkbox boolean
Dropdown string

 

Hope this helps.

Cheers,
Sneha.


Hi Daniel and Sneha,

Thank you for answering, but unfortunately the Filter Tickets endpoint does not work because of my second dot point. That endpoint only accepts updated_at as a yyyy-mm-dd date, and does not accept a time. This means that I can’t use the rolling timestamp to ensure I collect all tickets, and any day with over 300 tickets (which is every day) is going to get cut off at 300.

So it unfortunately sounds like this is something that Freshdesk can’t support natively, and I should go ahead with the scripting to collect all, but discard the unwanted group?


Reply