With the eStreamDesk API your application can easily retrieve a list of tickets filtered by various criteria in easy to parse and use XML format. This functionality can be used to backup your tickets, import them to other application or create various ticket notification functionality.
The retrieve a list of tickets you need to make a GET request to your Tickets API url:
There are two ways to authenticate with the Tickets API:
"apikey" header or get parameter - with this authentication the system will provide access to all tickets
"email" and "password" headers or get parameters - with this authentication the system will provide access to the tickets depending on the user; if the user is administrator it will provide access to all tickets; if the user is agent the system will provide access only to the tickets that the agent has access to
Here's a sample code to request all tickets in C#:
var webc = new WebClient();
var xmlString = webc.DownloadString("https://yoursite.estreamdesk.com/api/tickets");
And a sample response in XML:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Tickets Page="1" TotalPages="1">
<Comment Id="9498" UserId="557">
<Text>This is a test ticket!</Text>
The Tickets API supports some additonal GET parameters which you can use to filter the results.
"id" - specify a specific ticket ID
"fromId" - retrieves tickets after that ID; useful for notification application that periodically check for new tickets
"fromCommentId" - retrieves tickets with comments after that ID; useful for notification applications that periodically check for new ticket comments
"status" - filters by status; supported values are "Open", "Pending", "Solved", "Closed"
"type" - filters by type; supported values are "Question", "Problem", "Task"
"priority" - filters by priority; supported values are "Low", "Normal", "High", "Urgent"
The Ticket API returns tickets in pages of 100 tickets each. The <Tickets> element will contain information about the current page and the total number of pages for your query. If your query returns more than one page you can use the "page" parameter to request the other pages.
<Tickets Page="1" TotalPages="5">