Skip to main content

API, possible to sort tickets?

  • January 15, 2014
  • 8 replies
  • 246 views

I would like to use the API to pull recently modified/updated tickets (they appear to be sorted by date created).  I cant find anything in the API documentation or support forums but is this possible?

This topic has been closed for replies.

8 replies

  • Contributor
  • December 9, 2014

I have the same issue


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

Steve/Elo,


By default, the query that is used to return a list of tickets will fetch tickets based on created time . You could have a custom filter that will display the last updated tickets in the list view and then perform the API query to obtain the list of tickets based on this filter.


Create a custom filter as described in the screenshot below :





You could use the following query to obtain the list of tickets based on this filter.


curl -u user@yourcompany.com:test -H "Content-Type: application/json" -X GET http://domain.freshdesk.com/helpdesk/tickets//helpdesk/tickets/view/[view_id]?format=json?format=json&page=1




Aravind



  • Contributor
  • December 9, 2014

Thanks for your reply =)

I figure this out by requesting all tickets, then by sorting them after with a loop because the script I'm making has to be automatic, so I can't create custom filter graphically.

And I can't create a custom filter with the API, right ?


Is there a way to create view showing "customer responded" only ?

 


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

@Elo : Unfortunately,only the data can be fetched from the pre-defined views using API but it is not possible to create a view on the fly.


@John: There's no explicit option to achieve this ( We're working on this enhancement ) . However, as a workaround you can create multiple observer rules to achieve this. Watch out for the email that helps you to set this up :)


Cheers,

Aravind.S




  • Community Debut
  • July 27, 2017

@Aravind S: please send me the workaround solution to view only "customer responded" tickets as I have the same requirement to John. Thanks!


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

Hello Cathy,


I've just emailed you the workaround. Let me know if you need any further assistance.


Cheers!


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

Hi,


We've now released the option to filter tickets via API without having to create a custom view. Here's the link to the documentation :https://developer.freshdesk.com/api/#filter_tickets


Cheers!