GET api/Flight/Search?isLocal={isLocal}&airlineId={airlineId}&flightId={flightId}&flightNumber={flightNumber}&departureAirportId={departureAirportId}&destinationAirportId={destinationAirportId}
Search for a Flight using either Airline ID or a Flight ID or FlightNumber
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| isLocal | boolean |
Required |
|
| airlineId |
Supply Airline Id |
integer |
Default value is -1 |
| flightId |
Supply Flight Id |
integer |
Default value is -1 |
| flightNumber |
Supply FlightNumber |
string |
Default value is |
| departureAirportId | integer |
Default value is -1 |
|
| destinationAirportId | integer |
Default value is -1 |
Body Parameters
None.
Response Information
Resource Description
Retruns a Flight with the specefications provided or a list of all flights
IHttpActionResultNone.
Response Formats
application/json
Sample:
{
"Flights": [
{
"Id": 1,
"AirlineId": 2,
"FlightNumber": "A0554",
"DepartureAirportId": 1,
"DestinationAirportId": 1,
"IsLocal": true,
"Active": true,
"FlightDays": [
{
"Id": 1,
"FlightId": 1,
"DayId": 2
},
{
"Id": 1,
"FlightId": 1,
"DayId": 2
}
]
},
{
"Id": 1,
"AirlineId": 2,
"FlightNumber": "A0554",
"DepartureAirportId": 1,
"DestinationAirportId": 1,
"IsLocal": true,
"Active": true,
"FlightDays": [
{
"Id": 1,
"FlightId": 1,
"DayId": 2
},
{
"Id": 1,
"FlightId": 1,
"DayId": 2
}
]
}
],
"ErrorMessages": []
}
text/json
Sample:
{
"Flights": [],
"ErrorMessages": [
"All errors recorded here"
]
}