URL : http://localhost:8085/api/scheduleFlight
Method: POST
Request Payload:
{ "flightNumber":1, "departureTime":"13-4-2015 10:59:26", "noOfSeats": 10 }
Response Payload :
{ "status": "Success", "message": null }
-
Flight Number i.e flight instance should pre exist in database so that it can be scheduled (for testing purpose flightNumber : 1 & 2) can be used as Id.
-
create entry in data.sql to create flight instance.
URL : http://localhost:8085/api/bookSeat
Method: POST
Request Payload:
"flightNumber": 1, "userName": "aarshi99" }
Response Payload :
{ "status": "Success", "message": "", "seatId": 3 }
URL: http://localhost:8085/api/getAvailableSeats?flightNumber=1
Response Payload :
{ "status": "Success", "message": "", "count": 7 }