Unfuddle
Unfuddle STACK API

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'

Tags

Tags are shared across the account. Listing returns the tags in use in the projects you can read, or in one project, with the number of tickets carrying each. Use the optional q parameter to narrow by name.

To change a ticket's tags, PUT the Ticket with its new list of names; names that do not exist yet are created, and an empty list removes all of them. The tags as a GET returned them are accepted too: only each tag's name is read.

URL:
/api/v1/tags[GET]
/api/v1/projects/{id}/tags[GET]
/api/v1/tags/{id}[PUT]
Response Formats:
XML, JSON
Request/Response Body:
See Tag Data Model
Notes:
Renaming applies across the account. It requires being an account administrator, or having Manage access to Tickets in an active project where the tag is in use. Renaming to a name that already exists answers 409 Conflict with the existing tag and the number of tickets that would move. Repeat the request with merge=true to merge: every ticket moves to the existing tag, saved reports filtering on the old tag follow it, the old tag is removed, and the response is the surviving tag. A merge cannot be undone and is not recorded in ticket history.
Example:
curl -i -u username:password -X PUT \\
  -H 'Accept: application/json' -H 'Content-Type: application/json' \\
  -d '{"ticket": {"tags": ["billing", "customer"]}}' \\
  'https://mysubdomain.unfuddle.com/api/v1/projects/9812/tickets/98833.json'

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>
Filtering by tag:
tag-eq-{id} finds tickets with the tag and tag-neq-{id} tickets without it. tag-eq-0 finds tickets with no tags and tag-neq-0 tickets with at least one. Add tag to fields_string to get each ticket's tags.
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'