Untitled Page
API Overview
Example
Customers  
Companies  
Technicians  
Technician Groups  
Tickets  
Ticket History  
Ticket Attachments  
Billing Line Items  
Billing Invoices  
Time Tracking  
Knowledge Base Articles  
Scheduling  
Asset Managements  
 
Example
The example below is shown in 4 different programming languages. They are VB.Net, C#, PHP and Javascript. While we only provide the example in these 4 languages, you can use any programming language you wish to interact with the ReadyDesk Web Services API.

Plese note that because of the security limitations in AJAX, you can only use Javascript on the same domain where you have ReadyDesk installed. For example, if the URL to your ReadyDesk installation is http://www.yourdomain.com/readydesk, the AJAX request must also use http://www.yourdomain.com/readydesk, as AJAX does not allow requests to outside domains.

VB.Net C# PHP Javascript
This is an example of the "get_customers" action using VB.Net.
Imports System
Imports System.Net
Imports System.IO

Public Sub GetCustomers()
    Dim myUri As New Uri("http://localhost/readydesk/API/default.aspx?key=your key here&action=get_customers&cid=*") 
    If myUri.Scheme = myUri.UriSchemeHttp Then 
        Dim myRequest As HttpWebRequest = HttpWebRequest.Create(myUri) 
        myRequest.Method = WebRequestMethods.Http.Get 

        Dim myResponse As HttpWebResponse = myRequest.GetResponse() 
        If myResponse.StatusCode = HttpStatusCode.OK Then 

            Dim reader As New StreamReader(myResponse.GetResponseStream()) 
            Dim responseData As String = reader.ReadToEnd() 
            myResponse.Close() 

            If responseData <> "" And Not IsNothing(responseData) Then 
                Console.WriteLine(responseData) 
            End If 
        End If 
    End If 
End Sub

In the example above the request is made for "get_customers", using the * wildcard to return all customers in the database. The response is stored in the "responseData" variable, which is then presented to the user in the default XML format, since the "output" variable was not provided. You can parse the data as needed, depending on the output format chosen.