HTTP Verb: GET

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

Object: Task

Location: n/a

Formats: XML, JSON

Returns a paginated list of tasks. Pages are default to 25 tasks.

Params

Param Description
sort_by Field to sort by
sort_order Acceptable values are asc or desc, ascendent sorting is default.
from Date from tasks will be filtered, available formats are: dd/mm/yyyy, dd.mm.yyyy, dd-mm-yyyy, yyyy/mm/dd, yyyy.mm.dd, yyyy-mm-dd also time may be added, e.g. yyyy-mm-dd hh:mm
to Date tasks will be filtered until, available formats are: dd/mm/yyyy, dd.mm.yyyy, dd-mm-yyyy, yyyy/mm/dd, yyyy.mm.dd, yyyy-mm-dd also time may be added, e.g. yyyy-mm-dd hh:mm
spaces An array of space IDs to filter tasks by spaces, e.g. query string, XML and JSON:

?spaces[]=space_id&spaces[]=another_space_id...
<spaces>
  <space>_space_id</space>
  <space>_another_space_id</space>
  ...
</spaces>
{"spaces":["_space_id","_another_space_id",...]}
users An array of user IDs to filter tasks by users (only for spaces where requester is owner), e.g. query string, XML and JSON:

?users[]=user_id&users[]=another_user_id...
<users>
  <user>_user_id</user>
  <user>_another_user_id</user>
  ...
</users>
{"users":["_user_id","_another_user_id",...]}
ticket_ids An array of ticket IDs to filter tasks by:

?ticket_ids[]=ticket_id&ticket_ids[]=another_ticket_id...
page Parameter to specify which page to request, see per_page to determine how many items per page.
per_page Specify the number of tasks fetched per one page, default is 25.

Examples

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/tasks.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:08:42 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

<?xml version="1.0" encoding="UTF-8"?>
<user-tasks type="array">
  <user-task>
    <billed type="boolean">false</billed>
    <created-at type="datetime">2012-12-18T03:22:46Z</created-at>
    <ticket-number nil="true"></ticket-number>
    <space-id>b3gNxoscyr4Q7K5bfBjDYC</space-id>
    <begin-at type="datetime">2012-12-18T03:22:00Z</begin-at>
    <url nil="true"></url>
    <description>Description goes here</description>
    <updated-at type="datetime">2012-12-18T03:22:46Z</updated-at>
    <job-agreement-id nil="true"></job-agreement-id>
    <user-id>apr9bascyr4Q7K5bfBjDYC</user-id>
    <ticket-id nil="true"></ticket-id>
    <end-at type="datetime">2012-12-18T03:22:00Z</end-at>
    <hours type="decimal">1.0</hours>
    <id type="integer">8</id>
  </user-task>
  ...
</user-tasks>

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/tasks.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Fri, 07 Sep 2012 13:12:30 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

[
  {
    "billed": false,
    "created_at": "2012-12-17T08:52:20Z",
    "ticket_number": null,
    "space_id": "b3gNxoscyr4Q7K5bfBjDYC",
    "begin_at": "2012-12-17T08:51:00Z",
    "url": null,
    "description": "Description goes here",
    "updated_at": "2012-12-17T08:52:20Z",
    "job_agreement_id": null,
    "user_id": "apr9bascyr4Q7K5bfBjDYC",
    "ticket_id": null,
    "end_at": "2012-12-17T08:51:00Z",
    "hours": "1.0",
    "id": 7
  },
  ...
]

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

Description for each field: Task object fields reference