API - Tickets - Tags

  • 7 December 2015
  • 6 replies
  • 132 views

As per the AP section - Ticket:


"This section lists all API that can be used to create, edit or otherwise manipulate tickets. If you wish to create Tags to better identify tickets, this section also lists the APIs for creating and manipulating those tags."


Missing is any mention of tags for anything other than the Solutions Articles but notably missing is ticket tags.



This topic has been closed for comments

6 replies

Hi Mike,


Thanks for pointing out the inconsistency in the API docs. You can add tags to tickets by using the syntax,


"helpdesk":{"tags":"tag1,tag2"}


in the POST or PUT call.


Example for POST:


curl -u "sampleuser@acmeinc.com":"test" -H 'Content-Type:application/json' -d '{"helpdesk_ticket":{"email":"sampleuser@acmeinc.com","subject":"Ticket with Tags through API","description":"test"},"helpdesk":{"tags":"tag1,tag2"}}' -X POST 'https://acmeinc.freshservice.com/helpdesk/tickets.json'


This adds "tag1" and "tag2" as tags to the ticket.


Example for PUT:


curl -u "sampleuser@acmeinc.com":"test" -H 'Content-Type:application/json' -d '{"helpdesk_ticket":{"email":"sampleuser@acmeinc.com","subject":"Ticket with Tags through API","description":"test"},"helpdesk":{"tags":"tag3"}}' -X PUT 'https://acmeinc.freshservice.com/helpdesk/tickets/11.json'


This updates the ticket by adding a new tag called "tag3" (removes tag1 and tag2)


Following up here...doesn't appear that the ticket API returns any information on tags?


Seconded.

The inconsistency in the API docs is still there, and as far as I can see there's no way to get a list of tags on a ticket via the GET call.

There are examples for PUT and POST, but these are for adding or updating a ticket, not getting information from it.



Hi All,




We have recently updated the API Document. You can find the link here.




Also, we will be upgrading our API in the near future. We will surely keep you posted once we upgrade the API Version.




Is there a way to search tickets based on tags?


Hi Hugh, 


We have the option to search based on Tags in Freshservice. In the ticket view page, please go to the bottom of the page and you'd have the Tags option. You can enter the Tags here and the tickets corresponding to those tags would appear in your ticket list view. 


I hope this helps :) 


Happy supporting!