Author: nikben08
-
Clone the repository:
git clone https://github.com/nikben08/amadeus-flight-api.git
-
Navigate to the root directory:
cd amadeus-flight-api
-
Run container:
docker-compose up
You need to run the project on your local environment first.
localhost:8080/swagger-ui/index.html
Prepare your PostgreSQL server and then seed your airports and flights using the /api/v1/jobs/trigger
[POST]
endpoint!
You will need to set up Basic Authentication in Postman before executing any requests. To do this, you should create an API user with appropriate credentials.
This API provides access to comprehensive flight data based on given parameters. It allows users to search for flights between specified departure and arrival airports on a given departure date. Optionally, users can also retrieve return flights for the same airports by providing a return date.
/api/v1/flights/search
GET
-
departureAirportId
(required)- Type: Integer
- Description: The unique identifier of the departure airport.
- Example:
1
-
arrivalAirportId
(required)- Type: Integer
- Description: The unique identifier of the arrival airport.
- Example:
2
-
departureDate
(required)- Type: String (ISO 8601 Date Format: "YYYY-MM-DD")
- Description: The departure date for the outbound flight.
- Example:
"2024-02-20"
-
returnDate
(optional)- Type: String (ISO 8601 Date Format: "YYYY-MM-DD")
- Description: The return date for the inbound flight. If provided, it fetches return flights with the same airports.
- Example:
"2024-02-20"