GitHub - comettimvitor/Task-List-API: API for a simple tasklist. · GitHub
Skip to content

comettimvitor/Task-List-API

Folders and files

Repository files navigation

Task Management API

Description

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.

Features

  • 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.

Endpoints

  1. Creates a new task
    • URL: localhost:8080/task
    • Method: POST
    • Description: Creates a new task.
  2. Retrieves all tasks
    • URL: localhost:8080/task
    • Method: GET
    • Description: Retrieves all task.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

Using the application

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.

About

API for a simple tasklist.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages