This is a sample parking system which handles vehicle entry and exit flows
#Users
User -> User Name : user , Password : password
Admin -> User Name : admin , Password : admin
- Create Parking Slot : This API creates parking slot with the given name
Method Type : POST
Url : http://localhost:8080/parking/slot
Header : Content-Type : application/json
ALLOW FOR ADMIN ROLE Body :
{
"name" : "slot name"
"isFree" : true
}
Result :
{
"msg": "Successfully created parking slot",
"dateTime": "2022-11-11T04:54:22.258+0000"
}
- Get Parking slots : Returns the json representation of the parking slots.
Method Type : GET
Url : http://localhost:8080/parking/slot
Result :
{
"id" :
"name" : "slot name"
"isFree" : true
}
- **Create Vehicle Park ** : Enters the vehicle information in the system.
Method Type : POST
Url : http://localhost:8080/vehicle/park-in-slot
Header : Content-Type : application/json
Body :
{
"number" : "ABB 8800",
"type" : 0
"slotId" : 1
}
Result :
{
"msg": "Vehicle parking entry created",
"dateTime": "2022-11-11T04:54:22.258+0000"
}
- **Create Vehicle Exit ** : Enters the vehicle exit time and free's the occupied slot and makes entry in ParkingEntry table
Method Type : POST
Url : http://localhost:8080/vehicle/park-out-slot
Header : Content-Type : application/json
Body :
{
"id" : 52
}
Result :
{
"msg": "Vehicle exit from parking slot",
"dateTime": "2022-11-11T04:54:22.258+0000"
}
- Get Parking Entries : Returns all the entries in the system.
Method Type : GET
Url : http://localhost:8080/parking/entries
Result :
{
"id" : 1,
"slotName" : "slot name",
"vehicleNumber" : "ABB 8800",
"fare" : 50,
"inTime" : "2022-11-11T04:54:22.258+0000",
"outTime" : "2022-11-11T04:54:22.258+0000"
}