A containerized REST api that lets users manage tasks.
Entries will be saved in a local sqlite3 database called "Tasks". The Table has the following columns:
id | title | done |
---|---|---|
API will be implemented using flask and will consist of the following Endpoints:
Get all tasks.
Response:
[
{
"id": 0,
"title": "Task 1",
"done": false
},
{
"id": 1,
"title": "Task 2",
"done": true
}
]
Add a new task.
Body:
{ "title" : "Task 3" }
Response:
{
"id": 2,
"title": "Task 3",
"done": false
}
Get task with given id.
Response:
{
"id": 2,
"title": "Task 3",
"done": false
}
Update task with given id.
Body:
{
"id": 2,
"title": "Task 3",
"done": true
}
Response:
{
"id": 2,
"title": "Task 3",
"done": true
}