Get Tickets

Get Single Ticket

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/tickets/{TICKET_ID}

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/tickets/1322590922573033

Get Tickets by Creator

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/tickets/created-by/{USER_NAME}

URL Parameters:

page_no

Page number

page_size

Number of tickets in one page.

Example:

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/tickets/created-by/joe@acme.com?page_no=1&page_size=10

Get Tickets by Assignee

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/tickets/assigned-to/{USER_NAME}

URL Parameters:

page_no

Page number

page_size

Number of tickets in one page.

Example:

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/tickets/assigned-to/joe@acme.com?page_no=1&page_size=10

Get Labels and Its IDs

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/labels

Example

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/labels

Response

<labels>
  <label>
    <id>1322623923854043</id>
    <name>label1</name>
    <color>#000080</color>
    <font>0</font>
  </label>
</labels>

In this example, label’s ID is 1322623923854043 for label1.

Get Tickets by Label

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/tickets/with-label/{LABEL_ID}

URL Parameters:

page_no

Page number

page_size

Number of tickets in one page.

Example:

Suppose your iHelpdesk site name is acme, with user name being joe@acme.com and password being joe.

curl -u joe@acme.com:joe http://www.ihelpdesk.com/desktop/api/acme/tickets/with-label/sales?page_no=1&page_size=10

Get Ticket’s Attachments

After getting a ticket, we can know the IDs of its attachments if there any attachments.

URL:

http://www.ihelpdesk.com/desktop/api/{SITE_NAME}/attachments/{ATTACHMENT_ID}

Response

It’s different from others. The response is a binary data. Here’s an example of header of a response

HTTP/1.1 200 OK
Date: Wed, 30 Nov 2011 15:12:17 GMT
Server: Apache
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: x-prototype-version,x-requested-with
Access-Control-Allow-Methods: POST, GET, OPTIONS
Set-Cookie: JSESSIONID=8B4F8770B88EDB2C333D2016A6B3565A; Path=/desktop
Content-Disposition: attachment; filename=test.png
Content-Length: 140288
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: application/octet-stream