HTTP Verb: GET

Available statuses: 200 OK, 204 No Content, 404 Not Found

Object: Ticket

Location: n/a

Formats: XML, JSON

Returns tickets list. If no report is specified, default report set for space will be used.

Params

Param Description
report Specify report id. Assembla provides 10 predefined reports associated with IDs:

  • 0: All Tickets
  • 1: Active Tickets, order by milestone
  • 2: Active Tickets, order by component
  • 3: Active Tickets, order by user
  • 4: Closed Tickets, order by milestone
  • 5: Closed Tickets, order by component
  • 6: Closed Tickets, order by date
  • 7: All user tickets (authenticated user)
  • 8: All user's active tickets (authenticated user)
  • 9: All user's closed tickets (authenticated user)
  • 10: All user's followed tickets (authenticated user)
Also custom reports are available when created from UI, all custom reports start with the letter "u" before the report ID itself i.e. a custom report id looks like "u12": 12 is the report id.

Check the custom reports list API query for a list of custom reports.
page Parameter to specify which page to request, see per_page to determine how many items per page.
per_page Specify the number of tickets fetched per one page, default is 10.
sort_order Sort order, acceptable values are asc or desc, default is asc.
sort_by Field to sort by, acceptable values are id number summary priority completed_date created_on importance is_story milestone_id updated_at working_hours estimate total_estimate total_invested_hours total_working_hours.

Examples

Request JSON, using cURL utility:

curl -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/tickets.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 18 Jun 2012 11:31:32 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

[
  {
    "number":8,
    "custom_fields":{"Text Field":"","list":""},
    "total_estimate":0.0,
    "priority":1,
    "component_id":null,
    "story_importance":0,
    "space_id":"b89TL8MYWr4id7adbNA33N",
    "reporter_id":"bRxpnOMYWr4id7adbNA33N",
    "milestone_id":null,
    "status":1,
    "is_story":false,
    "notification_list":"",
    "permission_type":0,
    "description":"",
    "completed_date":null,
    "importance":0.0,
    "created_on":"2011-09-02T10:21:48Z",
    "total_invested_hours":0.0,
    "updated_at":"2012-04-12T10:32:58Z",
    "summary":"A nice ticket",
    "total_working_hours":0.0,
    "estimate":0.0,
    "id":10,
    "assigned_to_id":null,
    "status_name":"New",
    "working_hours":0.0
  },
  ...
]

JSON is formatted here for readability, in a real response JSON body is inline with no indentation.

Request XML, using cURL utility:

curl -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/tickets.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 18 Jun 2012 11:35:32 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

<?xml version="1.0" encoding="UTF-8"?>
<tickets type="array">
  <ticket>
    <total-working-hours type="float">0.0</total-working-hours>
    <status type="integer">1</status>
    <milestone-id nil="true"></milestone-id>
    <summary>A nice ticket</summary>
    <estimate type="float">0.0</estimate>
    <notification-list></notification-list>
    <description></description>
    <is-story type="boolean">false</is-story>
    <reporter-id>bRxpnOMYWr4id7adbNA33N</reporter-id>
    <space-id>b89TL8MYWr4id7adbNA33N</space-id>
    <permission-type type="integer">0</permission-type>
    <assigned-to-id nil="true"></assigned-to-id>
    <updated-at type="datetime">2012-04-12T10:32:58Z</updated-at>
    <story-importance type="integer">0</story-importance>
    <total-invested-hours type="float">0.0</total-invested-hours>
    <total-estimate type="float">0.0</total-estimate>
    <working-hours type="float">0.0</working-hours>
    <status-name>New</status-name>
    <created-on type="datetime">2011-09-02T10:21:48Z</created-on>
    <custom-fields>
      <Text-Field></Text-Field>
      <list></list>
    </custom-fields>
    <importance type="float">0.0</importance>
    <completed-date nil="true"></completed-date>
    <id type="integer">10</id>
    <component-id nil="true"></component-id>
    <priority type="integer">1</priority>
    <number type="integer">8</number>
  </ticket>
  ...
</tickets>

Description for each field: ticket object fields reference