Request Body Example:
{
"name": "Shiru",
"email": "shiru@example.com",
"password": "password123"
}
Response:
201 Created – User registered successfully.
400 Bad Request – Email already in use.
Description:
Creates a new task for a specific user. The userId must be passed as a request parameter.
Request Param:
userId – ID of the user who owns this task
Request Body Example:
{
"title": "Submit Report",
"description": "Submit final task tracker report to supervisor",
"dueDate": "2025-06-05",
"status": "PENDING"
}
Response:
201 Created – Task created and linked to user.
400 Bad Request – User not found.
Description:
Fetches a list of all tasks available in the database.
Response:
200 OK – List of all task objects.
Description:
Fetches a specific task by its ID.
id – Task ID
Response:
200 OK – Task found
404 Not Found – Task does not exist
Description:
Updates an existing task's details like title, description, due date, or status.
Path Variable:
id – Task ID
Request Body Example:
{
"title": "Updated Title",
"description": "Updated Description",
"dueDate": "2025-06-10",
"status": "IN_PROGRESS"
}
Response:
200 OK – Updated task returned
404 Not Found – Task does not exist
Description:
Deletes the task with the specified ID.
Path Variable:
id – Task ID
Response:
200 OK – "Task deleted"
404 Not Found – Task not found
Description:
Returns a list of tasks filtered by their status.
Path Variable:
status – Enum value: PENDING, IN_PROGRESS, or COMPLETED
Example:
/tasks/status/COMPLETED
Response:
200 OK – List of tasks matching the status
Description:
Returns a list of tasks that are due on the specified date.
Path Variable:
dueDate – Date in yyyy-MM-dd format (e.g., 2025-06-10)
Response:
200 OK – List of tasks due on that date