Kaiburr-Assessment(Harsh Srivastava VIT ,vellore)

Task 1
used springboot for completing task
endpoints

  1. /add (Add the details to the database)
  2. /getById (Retrive the data using ID)
  3. /getByName ( Retrive the Data using name)
  4. /deleteById (Delete from the Database using ID)

Rest API's postman:

  1. /addServer
  2. /findByName
  3. /findByID
  4. /deleteByID

Controller: /Server/src/main/java/com/spring/test/controller

Task 3
To Run in docker.
Open terminal
Go to Server/target
And run docker build . -t server
This will create a image of the JAR file.
Now run the docker-compose.yml using docker-compose up.
Now using web Browser at localhost:8086 we can use the endpoints.

Task 2
To create the Swagger API is Used the online edittor. And downloaded the code as Server for Spring. But was unable to make it work. So I Have upload the YAML file which I was able to create.

Screenshots

  1. /add : add details

  2. /done :data inserted

  3. /getById : server details using id

  4. /deleteById : delete using ID

  5. /getByName : getserver details usingName