- Run the command on project root directory.
docker-compose up --build
- Access the server via
localhost:8000
.
GET /tasks
Request body: None
Response Body:
[
{
"id": "df5a297e-ee77-4d43-bbe5-b04aaa91ee1d",
"name": "study",
"status": 2,
"duration": 10,
"remainder": 10,
"start_at": null,
"end_at": null
}
]
GET /tasks/:task_id
Request body: None
Response Body:
{
"id": "df5a297e-ee77-4d43-bbe5-b04aaa91ee1d",
"name": "study",
"status": 2,
"duration": 10,
"remainder": 10,
"start_at": null,
"end_at": null
}
GET /tasks
Request body:
{
"name": "study",
"duration": 10,
"webhook_url": "http://example.webhook.com"
}
Response Body:
{
"id": "df5a297e-ee77-4d43-bbe5-b04aaa91ee1d",
"name": "study",
"status": 2,
"duration": 10,
"remainder": 10,
"start_at": null,
"end_at": null
}
GET /tasks/:task_id/operations
Request body: (start
, resume
, pause
)
{
"operation": "resume"
}
Response Body:
{
"id": "df5a297e-ee77-4d43-bbe5-b04aaa91ee1d",
"name": "study",
"status": 2,
"duration": 10,
"remainder": 10,
"start_at": null,
"end_at": null
}