TaskFlow is a lightweight task management microservice designed to handle the complete lifecycle of tasks within a distributed system.
In the root directory, open the console and run command:
docker compose up -d
The application runs on port 8080.
http://localhost:8080/tasks/swagger-ui.html
Creates a new task and send event to kafka.
Endpoint: POST /api/v1/tasks
Request Body:
{
"name": "sum",
"description": "2 + 2 = ?"
}Constraints:
- Parameter
namemust be between 3 and 30 characters and cannot be empty. - Parameter
textcannot exceed 1000 characters and cannot be empty.
Response 201
{
"taskId": "550e8400-e29b-41d4-a716-446655440000"
}Response 400
{
"message": "Description cannot exceed 1000 characters",
"errorCode": "400",
"timestamp": "2026-02-18T14:51:52.7853999",
"path": "http://localhost:8080/api/v1/tasks"
}Gets task and they assigned user by its ID.
Endpoint: GET /api/v1/tasks/{taskId}
Constraints:
- Parameter
taskIdmust be UUID
Response 200
Successful response:
{
"name": "sum",
"description": "2 + 2 = ?",
"status": "COMPLETED",
"user": {
"userId": "33815145-ce49-450f-995d-33e84553ff77",
"name": "user",
"email": "user@gmai.com"
}
}Response 400
{
"message": "Method parameter 'taskId': Failed to convert value of type 'java.lang.String' to required type 'java.util.UUID'; Invalid UUID string: 32w34432452345234545rgtfre4tfge4r",
"errorCode": "400",
"timestamp": "2026-02-18T15:08:47.0176812",
"path": "http://localhost:8080/api/v1/tasks/32w34432452345234545rgtfre4tfge4r"
}Response 404
{
"message": "Task with id: 3c52b478-590a-4665-b64f-49cc63caba18 not found",
"errorCode": "404",
"timestamp": "2026-02-18T15:09:48.4383468",
"path": "http://localhost:8080/api/v1/tasks/3c52b478-590a-4665-b64f-49cc63caba18"
}Gets all tasks with pagination.
Endpoint: GET /api/v1/tasks
Constraints:
- Parameter
pagemust be >= 0 - Parameter
sizemust be >= 1
Response 200
Successful response:
[
{
"taskId": "550e8400-e29b-41d4-a716-446655440000",
"name": "sum",
"description": "2 + 2 = ?",
"status": "COMPLETED"
},
{
"taskId": "e31c4cd3-bf13-4bbf-a241-820136e122b9",
"name": "sum",
"description": "2 + 2 = ?",
"status": "IN_PROGRESS"
}
]Change status to task.
Endpoint: PUT /api/v1/tasks/{taskId}/status
Request Body:
{
"status": "FAILED"
}Constraints:
- Parameter
statuscannot be null - Parameter
taskIdmust be uuid
Response 200 Void
Response 400
{
"message": "Method parameter 'taskId': Failed to convert value of type 'java.lang.String' to required type 'java.util.UUID'; Invalid UUID string: 32w34432452345234545rgtfre4tfge4r",
"errorCode": "400",
"timestamp": "2026-02-18T15:08:47.0176812",
"path": "http://localhost:8080/api/v1/tasks/32w34432452345234545rgtfre4tfge4r/status"
}Response 404
{
"message": "Task with id: 3c52b478-590a-4665-b64f-49cc63caba18 not found",
"errorCode": "404",
"timestamp": "2026-02-18T15:09:48.4383468",
"path": "http://localhost:8080/api/v1/tasks/3c52b478-590a-4665-b64f-49cc63caba18/status"
}Assign user to task and send event to kafka
Endpoint: PUT /api/v1/tasks/{taskId}/assignee
Request Body:
{
"userId": "33815145-ce49-450f-995d-33e84553ff77"
}Constraints:
- Parameter
userIdcannot be null and must be uuid - Parameter
taskIdmust be uuid
Response 200 Void
Response 400
{
"message": "Method parameter 'taskId': Failed to convert value of type 'java.lang.String' to required type 'java.util.UUID'; Invalid UUID string: 32w34432452345234545rgtfre4tfge4r",
"errorCode": "400",
"timestamp": "2026-02-18T15:08:47.0176812",
"path": "http://localhost:8080/api/v1/tasks/32w34432452345234545rgtfre4tfge4r/assignee"
}Response 404
{
"message": "Task or user not found",
"errorCode": "404",
"timestamp": "2026-02-18T15:08:47.0176812",
"path": "http://localhost:8080/api/v1/tasks/3c52b478-590a-4665-b64f-49cc63caba18/assignee"
}