Skip to content

sahilmalhotra92/embl-person-manage-rest-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

embl-person-manage-rest-service

embl-person-manage-rest-service

  • API version: 1.0
    • Build date: 2021-02-11T12:16:25.959+13:00[Pacific/Auckland]

EMBL API

Description

Demo repository for managing persons using in memory storgae

Requirements

Building the project requires:

  1. Docker
  2. Maven

Build and Deploy instructions without Docker

Execute below command from home directory of project

mvn spring-boot:run

Build and Deploy instructions with Docker

1. Generate Jar

At first generate the JAR by executing:

mvn clean package

JAR will be generated in target folder of the project

2. Generate Docker image

Docker image will be generated by executing below command from home directory of project

docker build -t embl/embl-person-manage-rest-service .

Verify image is generated by executing below command

docker images

3. Create container

Execute the below command to create container

docker run -p 8080:8080 -t embl/embl-person-manage-rest-service

Testing API Endpoints

BaseUrl for all the endpoints will be http://hostname:8080

All the endpoints are secured using basic authentication, so Authorization header needs to be sent with all the requests.

Username: admin

Password: password

more details for all the endpoints are available in openAPI specs

Documentation for API Endpoints

All URIs are relative to http://hostname:8080

Method HTTP request Description
createPerson POST /api/v1/persons create person
deletePerson DELETE /api/v1/persons/{personId} delete person by personId
fetchAllPersons GET /api/v1/persons fetch all the persons
fetchPerson GET /api/v1/persons/{personId} fetch person by personId
updatePerson PUT /api/v1/persons/{personId} update person by personId

Documentation for Models

Author

Sahil Malhotra

About

demo repository for managing persons using in memory storgae

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages