Tickets

Introduction

Each Project can have any number of Tickets.

Each Ticket can have any number of Attachments. See Attachments for more information.

Each Ticket can have any number of Comments. See Comments for more information.

Each Ticket can have any number of Time Entries. See Time Tracking for more information.

Each Ticket can have any number of Subscriptions. A Subscription represents the desire of a particular Person to deliberately be notified of changes to a Ticket. The Ticket reporter and current assignee are automatically considered subscribers without being a part of this collection.

Tickets

The collection represents all Tickets within a Project.

URL:
/api/v1/projects/{id}/tickets[GET, POST]
/api/v1/projects/{id}/tickets/{id}[GET, PUT, DELETE]
/api/v1/projects/{id}/tickets/by_number/{number}[GET]
Response Formats:
XML, JSON, ICS
Parameters (via query string or request body):
<request>
  <!-- can be used in order to obtain the first n characters of the ticket description.
  It also affects the description-formatted field if applicable.
  Special care should be taken NOT to update those tickets as they are provided for display purpose only. -->
  <truncate>25</truncate>
  <!-- The default limit for the number of tickets returned in a single request is 100.
  The maximum user-definable limit is 500.
  Increment the page parameter in order to retrieve the next N tickets.-->
  <limit>100</limit>
  <page>1</page>
</request>
Request/Response Body:
See Ticket Data Model
Notes:
Please note that the "by_number" URL is meant as a convenience only. If you wish to POST or DELETE to a Ticket, or access nested resources such as Comments or Attachments, you must use the URL based on the Ticket ID.
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/tickets/98833.xml'

TicketAssociations

All TicketAssociations for a Ticket.

URL:
/api/v1/projects/{id}/tickets/{id}/ticket_associations[GET, POST]
/api/v1/projects/{id}/tickets/{id}/ticket_associations/{id}[GET, PUT, DELETE]
Response Formats:
XML, JSON
Request/Response Body:
See Ticket Association Data Model
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/tickets/98833/ticket_associations.xml'

Subscriptions

The collection represents all Subscriptions for a Ticket.

URL:
/api/v1/projects/{id}/tickets/{id}/subscriptions[GET, POST]
/api/v1/projects/{id}/tickets/{id}/subscriptions/{id}[GET, PUT, DELETE]
Response Formats:
XML, JSON
Request/Response Body:
See Subscription Data Model
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/tickets/98833/subscriptions.xml'

Subscribe/Unsubscribe

These two resources exist as a convenience. Performing an HTML PUT to either of these URLs will subscribe or unsubscribe the requesting Person from the Ticket.

URLs:
/api/v1/projects/{id}/tickets/{id}/subscribe[PUT]
/api/v1/projects/{id}/tickets/{id}/unsubscribe[PUT]
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/tickets/98833/subscribe.xml'

TicketReports

The collection represents all TicketReports for either an Account or a Project. Note that the instance of a TicketReport does not include its result set, but rather represents the TicketReport as a concept.

URLs:
/api/v1/ticket_reports[GET, POST]
/api/v1/projects/{id}/ticket_reports[GET, POST]
/api/v1/ticket_reports/{id}[GET, PUT, DELETE]
/api/v1/projects/{id}/ticket_reports/{id}[GET, PUT, DELETE]
Response Formats:
XML, JSON
Request/Response Body:
See Ticket Report Data Model
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/ticket_reports/6732.xml'

TicketReport Generation

A TicketReport, including its output.

URLs:
/api/v1/ticket_reports/{id}/generate[GET]
/api/v1/projects/{id}/ticket_reports/{id}/generate[GET]
Response Formats:
XML, JSON, RSS, ICS, CSV
Request/Response Body:
For XML, see Ticket Report Data Model
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/ticket_reports/6732/generate.xml'

Dynamic Reporting

TicketReports can also be generated dynamically, removing the need for a saved report.

URLs:
/api/v1/ticket_reports/dynamic[GET]
/api/v1/projects/{id}/ticket_reports/dynamic[GET]
Response Formats:
XML, JSON, RSS, ICS, CSV
Parameters (via query string or request body):
<request>
  <!-- specifies the title of the report -->
  <title>Dynamic Ticket Report</title>
  <!-- specifies how the resulting tickets should be grouped -->
  <group-by>milestone</group-by>
  <!-- specifies the field by which to sort, if any -->
  <sort-by>number</sort-by>
  <!-- specifies the sort direction -->
  <sort-direction>ASC</sort-direction>
  <!-- specifies the fields for the report (not required, only for completeness) -->
  <fields-string>number,summary,assignee</fields-string>
  <!-- specifies the conditions for the report -->
  <conditions-string>assignee-eq-current,status-eq-closed|status-eq-resolved,milestone-eq-34584</conditions-string>
</request>
Response Body:
For XML, see Ticket Report Data Model
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/ticket_reports/dynamic.xml?title=A+Dynamic+Report&conditions_string=assignee-eq-current,status-neq-closed,status-neq-resolved'

AssociatedChangesets

The collection represents all Changesets objects associated with the specified Ticket

URLs:
/api/v1/projects/{id}/tickets/{id}/associated_changesets[GET]
Response Formats:
XML, JSON
Request/Response Body:
See Changeset Data Model
Example:
curl -i -u username:password -X GET \\
  -H 'Accept: application/xml' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/tickets/6732/associated_changesets.xml'