Skip to content

aarora0301/demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FLIGHT BOOKING SERVICE

API Specification

1. Schedule Flight

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 }

Assumptions
  • 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.

2. Book Seat

URL : http://localhost:8085/api/bookSeat
Method: POST
Request Payload:
"flightNumber": 1, "userName": "aarshi99" }

Response Payload :
{ "status": "Success", "message": "", "seatId": 3 }

3. Get Available Seats

URL: http://localhost:8085/api/getAvailableSeats?flightNumber=1
Response Payload :
{ "status": "Success", "message": "", "count": 7 }

About

Flight Reservation Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages