GET /v1/tasks
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.
Params
| Param | Description |
|---|---|
| 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. |
| from | Return tasks after a specified date and time. Any valid date formats are acceptable, for example yyyy-mm-dd hh:mm, yyyy/mm/dd hh:mm. |
| to | Return tasks before a specified date and time. Any valid date formats are acceptable, for example yyyy-mm-dd hh:mm, yyyy/mm/dd hh:mm. |
| filter[spacegroup] |
Specify space group ID. Assembla provides the following predefined space group IDs:
|
| filter[usergroup] |
Specify user group ID. Assembla provides the following predefined user group IDs:
|
| 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",...]}
|
Examples
Request XML, using cURL utility:
curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/tasks.xml?portfolio=_portfolio_subdomain
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>
<id type="integer">32</id>
<description>Description goes here</description>
<url nil="true"></url>
<hours type="decimal">2.0</hours>
<begin-at type="datetime">2013-06-03T22:43:00-05:00</begin-at>
<end-at type="datetime">2013-06-03T22:43:00-05:00</end-at>
<billed type="boolean">false</billed>
<space-id>d6_muWDNyr4PMj5bfBjDYC</space-id>
<ticket-number nil="true"></ticket-number>
<ticket-id nil="true"></ticket-id>
<user-id>b-MzlCHimr4PYu5bfBjDYC</user-id>
<job-agreement-id nil="true"></job-agreement-id>
<created-at type="datetime">2013-06-03T22:44:27-05:00</created-at>
<updated-at type="datetime">2013-06-03T22:44:27-05:00</updated-at>
</user-task>
...
</user-tasks>
Request JSON, using cURL utility:
curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/tasks.json?portfolio=_portfolio_subdomain
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
...
[
{
"id": 32,
"description": "Description goes here",
"url": null,
"hours": "2.0",
"begin_at": "2013-06-03T22:43:00-05:00",
"end_at": "2013-06-03T22:43:00-05:00",
"billed": false,
"space_id": "d6_muWDNyr4PMj5bfBjDYC",
"ticket_number": null,
"ticket_id": null,
"user_id": "b-MzlCHimr4PYu5bfBjDYC",
"job_agreement_id": null,
"created_at": "2013-06-03T22:44:27-05:00",
"updated_at": "2013-06-03T22:44:27-05:00"
},
...
]
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