Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

REST API :: Tasks

George Czabania edited this page Feb 20, 2014 · 3 revisions

Tasks

Show all tasks

GET /api/tasks

Show all tasks in a list

GET /api/lists/:list_id/tasks

Update a task

PUT /api/tasks/:task_id

Create a task

POST /api/lists/:list_id/tasks

Move a task to a new list

PUT /api/tasks/:task_id/move

Parameters:

  • task[listId] : the ID of the list to move to

Example Request:

curl -X PUT \
  -H "Authorization: bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"task":{"listId":20}}' \
  https://nitro-server.herokuapp.com/api/tasks/42/move

Example Response:

HTTP/1.1 200 OK
Content-Type: appliation/json; charset=utf0-8

{
  "id": 42,
  "listId": 20,
  "userId": 2,
  "name": "A task",
  "notes": "",
  "date": 0,
  "priority": 1,
  "completed": 0
}

Destroy a task

DELETE /api/tasks/:task_id
Clone this wiki locally