Skip to content

API Endpoints

Anantha Raju C edited this page Sep 29, 2020 · 1 revision

URLs

URL Method Remarks
http://localhost:8080/index GET Home Page
http://localhost:8080/sbat/index GET Home Page
http://localhost:8080/sbat/about GET About Page
http://localhost:8080/sbat/tech-stack GET Technology Stack Table
http://localhost:8080/sbat/close GET Close App via Actuator
http://localhost:8080/sbat/login GET Login Page
http://localhost:8080/sbat/error GET Custom Error Page

Other URLs

URL Method
http://localhost:8080/api/generic-hello GET
http://localhost:8080/api/personalized-hello/ GET
http://localhost:8080/api/personalized-hello?name=spring-boot GET
http://localhost:8080/api/loggers GET

Actuator

To monitor and manage your application

URL Method
http://localhost:8080/actuator/ GET
http://localhost:8080/actuator/health GET
http://localhost:8080/actuator/info GET
http://localhost:8080/actuator/prometheus GET
http://localhost:8080/actuator/httptrace GET

Person URLs

Accessible to johndoe user only

URL Method Remarks Sample Valid Request Body
http://localhost:8080/api/v1/person GET Header Accept:application/json or Accept:application/xml for content negotiation
http://localhost:8080/api/v1/person POST Add a person JSON
http://localhost:8080/api/v1/person/{id} GET Header Accept:application/json or Accept:application/xml for content negotiation
http://localhost:8080/management/api/v1/person/pageable GET Header Accept:application/json or Accept:application/xml for content negotiation Pageable API Endpoint
http://localhost:8080/api/v1/person/{id} PUT Update a person JSON
http://localhost:8080/api/v1/person/{id} DELETE Delete a person

Person Management URLs

Role and Permission based secure access to AdminUser and AdminTrainee users

URL Method Remarks Sample Valid Request Body
http://localhost:8080/management/api/v1/person GET Header Accept:application/json or Accept:application/xml for content negotiation
http://localhost:8080/management/api/v1/person POST Add a person JSON
http://localhost:8080/management/api/v1/person/{id} GET Header Accept:application/json or Accept:application/xml for content negotiation
http://localhost:8080/management/api/v1/person/pageable GET Header Accept:application/json or Accept:application/xml for content negotiation Pageable API Endpoint
http://localhost:8080/management/api/v1/person/{id} PUT Update a person JSON
http://localhost:8080/management/api/v1/person/{id} DELETE Delete a person

Sample Valid JSON Request Bodys

{
	"name": "Jane",
	"username": "janejane",
	"emailPrimary": "[email protected]",
	"emailSecondary": "[email protected]",
	"phone":9191919191,
	"gender": "FEMALE",
	"age": 25,
	"password": "password",
	"dob":"25-12-2005",
	"isAdult":true,
	"address": {
		"street": "Jane Plains",
		"suite": "Suite 779",
		"city": "Wisokyburghh",
		"zipcode": "90565-7771",
		"geo": {
			"lat": "-43.9589",
			"lng": "-34.4628"
		}
	}
}