GET all unresolved and unclosed ticket

Hi Guys


I'm trying to optimize usage of your API and there is a huge problem with getting all tickets that have status other that Closed and Resolved.

Filter new_my_open returns just tickets with status = 2

all_tickets fetches all tickets (including those I don't need) which requires more requests than it's necessary. 


In short words I'm looking for a way to get status != 4 AND status != 5


Any ideas?


Hello Dybizbanski,


There is no direct API to filter tickets only based on status. However, I can suggest you to use another API to get the same result.


You could create a custom view by filtering based on status in tickets page. Please refer this article if you need more information on how to do that.


Once the custom view is created, you can fetch tickets using Custom ticket view API


The API endpoint would be,


http://domain.freshdeks.com/helpdesk/tickets/view/[view_id]?format=json


Note: 

1. domain.freshdeks.com => your freshdesk url

2. view_id is the id which you can see in the url after you saved the view.


Hope this suggestion suits your needs.

 

Hi Rashmi,


Thanks for quick answer, this should do the job.


However, another question appears: Can I create the view via API? 

It's the only way I can access the account and I can't see anything like this in the API documentation.

No. It's not possible to create a view using API at the moment. 

I suppose creating a custom view based on status will be a one time activity. I suggest you to use the above said approach.


However, if you could elaborate on "It's the only way I can access the account",  I will try to find out the best possible solution for your needs.

We're providing a time tracking service for customers and the integration with Freshdesk is one of our features (More here)


Our customer provides his ticket in our system and we import tickets for time tracking purpose via the API. 

That's why I can't create a tickets view in the other way than with API.

I tried hard to find any workaround which suits your needs.  Unfortunately the best solution with which we can help you is the above said one. 



Hi Rashmi,


Thanks for your effort.. Suggested solution sounds great, but as I can't create a view via API I'm unable to use it.


Regards,

Milosz

 The API v2 documentation shows predefined filters as available for query in the API. Is there a reason the unresolved predefined filter does not work?


Predefined filters /api/v2/tickets?filter=[filter_name]


Available predefined filters:


Login or Signup to post a comment