Skip to content

JulijaLu/EventLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful application for Event Logger


RESTful API provides an ability to add and modify events of application logs.

Tech Stack


JDK 21
Spring Boot
Maven
MyBatis
H2 in-memory database

Build


Prerequisite: Java JDK 21

./mvnw clean install

Run


./mvnw spring-boot:run

Basic Authentication

Use the following credentials to access the API:

  • Username: user
  • Password: password

Server


http://localhost:5000/

Swagger documentation


http://localhost:5000/swagger-ui/index.html

Sample flow


See all events:

GET: http://localhost:5000/events

Create new event:

POST: http://localhost:5000/events

Request body:

{ "type": "WARNING",
    "message": "obsolete method",
    "userId": 10103,
    "transactionId": 333555668 }

Response example:

Update event:

PUT: http://localhost:5000/events/{id}

Request body:

{ "type": "INFO",
    "message": "event updated",
    "userId": 10101,
    "transactionId": 333555666 }

Delete event:

DELETE: http://localhost:5000/events/{id}

About

RESTfulAPI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published