Skip to content

Latest commit

 

History

History
83 lines (70 loc) · 1.01 KB

README.md

File metadata and controls

83 lines (70 loc) · 1.01 KB

iav-tasks-api

A containerized REST api that lets users manage tasks.

Task Model

Entries will be saved in a local sqlite3 database called "Tasks". The Table has the following columns:

id title done

API Endpoints

API will be implemented using flask and will consist of the following Endpoints:

/tasks

GET

Get all tasks.

Response:

[
  {
    "id": 0,
    "title": "Task 1",
    "done": false
  },
  {
    "id": 1,
    "title": "Task 2",
    "done": true
  }
]

POST

Add a new task.

Body:

{ "title" : "Task 3" }

Response:

{
    "id": 2,
    "title": "Task 3",
    "done": false
}

/task/{id}

GET

Get task with given id.

Response:

{
    "id": 2,
    "title": "Task 3",
    "done": false
}

POST

Update task with given id.

Body:

{
    "id": 2,
    "title": "Task 3",
    "done": true
}

Response:

{
    "id": 2,
    "title": "Task 3",
    "done": true
}