RESTful API developed for manager tasks. It creates, updates, retrieves and deletes tasks. This API uses a H2 Database for storage and is useful for development, testing and studying.
- Create tasks: add tasks in the H2 database.
- Update tasks: update tasks based on what he user needs.
- Delete tasks: remove tasks from the H2 database.
- Retrieve tasks: search for tasks based on its ID or name.
- Creates a new task
- URL: localhost:8080/task
- Method: POST
- Description: Creates a new task.
- Retrieves all tasks
- URL: localhost:8080/task
- Method: GET
- Description: Retrieves all task.
- Retrieves tasks by name
- URL: localhost:8080/task?taskName=TASK_NAME
- Method: GET
- Description: Retrieves a task based on its name.
- Parameters: 'TASK_NAME' is a mandatory parameter.
- Retrieves tasks by id
- URL: localhost:8080/task?id=TASK_ID
- Method: GET
- Description: Retrieves a task based on its id.
- Parameters: 'TASK_ID' is a mandatory parameter.
- Update tasks
- URL: localhost:8080/task?id=TASK_ID
- Method: PUT
- Description: Updates a task based on its id.
- Parameters: 'TASK_ID' is a mandatory parameter.
- Delete tasks
- URL: localhost:8080/task?id=TASK_ID
- Method: GET
- Description: Deletes a task based on its id.
- Parameters: 'TASK_ID' is a mandatory parameter.
The application uses an 'In Memory' database, so no need to install any database. The configuration of the database is made in the "application.properties" and creates a single table called "task" when the application starts using the "data.sql" file, then it inserts 3 tasks in the table using the method populatesH2Database().
Its possible to teste the API with tools like Postman, sending HTTP requests to the mentioned endpoints.
