A REST API for creating and managing tasks, built with Spring Boot and Spring Data JPA.
- Create, read, update, and delete tasks
- Filter tasks by status (TODO, IN_PROGRESS, DONE)
- Pagination support for listing tasks
- Sorting by due date (or any field)
- Input validation on task creation/updates
- Java 17
- Spring Boot 3
- Spring Data JPA
- H2 Database (in-memory, for development)
- Maven
- Lombok
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/tasks | Create a new task |
| GET | /api/tasks | List all tasks (supports pagination, sorting, and status filtering) |
| GET | /api/tasks/{id} | Get a single task by id |
| PUT | /api/tasks/{id} | Update an existing task |
| DELETE | /api/tasks/{id} | Delete a task |
status— filter by TODO, IN_PROGRESS, or DONEpage— page number, starting at 0size— number of results per pagesort— field and direction, e.g.dueDate,asc
Example:## Example Request
POST /api/tasks
{
"title": "Finish Task Manager API",
"description": "Build my first Spring Boot project",
"status": "TODO",
"dueDate": "2026-07-25"
}- Clone the repository
- Run
mvn spring-boot:run(or runTaskManagerApiApplication.javafrom your IDE) - The API will start on
http://localhost:8081
Built by Ntokie as part of a self-directed Java/Spring Boot portfolio.