Create an API that allows users to manage their TO-DO list Provide API documentation
The API must have
- Ruby 3.0.0
- Rails 7.0.3
- PostgreSQL 12.10
bundle install
bundle exec rails db:create
bundle exec rails db:schema:load
GET /tasks
Parameters:
page
page numberper_page
number of items per pagestatus
filter by status- Values:
created
read
executed
- Values:
archived
true or false (will not return archived tasks unless is set totrue
) Example:
http://localhost:3000/tasks?page=1&per_page=10&status=created
POST /tasks
{
"task": {
"title": #task title
}
}
PATCH /tasks/{#id}
{
"task": {
"status": # status (created, read or executed)
"archived": # true or false
}
}
May return HTTP status 404 when task with id could not be found
DELETE /tasks/{#id}
May return HTTP status 404 when task with id could not be found