Tasks

Tasks are TODO items that can be added to projects and assigned to staff members

Get Tasks

GET /tasks
{
  "total_count": 6,
  "page_count": 1,
  "page_size": 50
  "tasks": [
    {
      "completed_at": null,
      "created_at": "2012-11-08T21:20:47Z",
      "title": "Redesign website",
      "assignee_id": null,
      "updated_at": "2012-11-08T21:20:47Z",
      "project_id": null,
      "id": 1,
      "user_id": 1,
      "client_id": null,
      "due_date": null,
      "complete": false,
      "description": null
    },
    ...
  ]
}
GET /projects/:project_id/tasks

Tasks are also considered a nested resource for Projects

Get A Task

GET /tasks/:id
{
  "completed_at": null,
  "created_at": "2012-11-08T21:20:47Z",
  "title": "Redesign website",
  "assignee_id": null,
  "updated_at": "2012-11-08T21:20:47Z",
  "project_id": null,
  "id": 1,
  "user_id": 1,
  "client_id": null,
  "due_date": null,
  "complete": false,
  "description": null
}

Create A New Task

POST /task
{
  "task": {
    "title": "Pick up some milk"
  }
}

Required Fields: title (HTTP 422 on failure)

If you want to assign this task to a project or staff, you can use the project_id and assignee_id attributes, respectively.

Update A Task

PUT /tasks/:id

You may provide a partial list of fields to update

{    
  "task": {
    "completed": true
  }
}

Delete A Task

DELETE /tasks/:id

Deletions are permanent and not reversible.