API - Tickets

Getting a list of all tickets

This request returns a summary of all tickets in the account.

GET "https://app.samanage.com/tickets.xml"

curl --digest -u "username:password" -H "Accept: application/vnd.samanage.v1+xml" -X GET "https://app.samanage.com/tickets.xml"


Getting ticket's details

Request

GET "https://app.samanage.com/tickets/158702.xml"

curl --digest -u "username:password" -H "Accept: application/vnd.samanage.v1+xml" -X GET "https://app.samanage.com/tickets/158702.xml"

Response

<ticket>
<type>Aquisition</type>
<priority>Medium</priority>
<created-at>2009-07-25T22:35:27-07:00</created-at>
<description> SAManage Support Center </description>
<updated-at>2009-07-25T22:37:15-07:00</updated-at>
<summary> SAManage Support Center22 </summary>
<assigned-to nil="true"></assigned-to>
<due-date nil="true"></due-date>
<href>https://app.samanage.com/tickets/75-samanage-support-center22.xml</href>
<state>closed</state>
<id>75</id>
<number>36</number>
</ticket>


Example: Getting all tickets for a computer

Get the details of a specific ticket using the command below.

curl --digest -u "username:password" -H "Accept: application/vnd.samanage.v1+xml" -X GET "https://app.samanage.com/hardwares/12345/tickets.xml"



Updating a ticket

The following request will update ticket properties for a specific ticket.

PUT "https://app.samanage.com/tickets/158702.xml"

curl --digest -u "username:password" -d @stuff_to_update.xml -H "Content-Type:text/xml" -X PUT "https://app.samanage.com/tickets/29.xml"

or

curl --digest -u "username:password" -d "<tickets><summary>Ticket summary</summary></tickets>" -H "Content-Type:text/xml" -X PUT "https://app.samanage.com/tickets/29.xml"

@stuff_to_update is an XML file with the properties you wish to update:

<tickets>
<summary>Ticket summary</summary>
</tickets>

The following properties can be updated:

summary
description
type
priority
state
requester
assigned-to
comments