Flights
This page documents the flight APIs implemented in backend/flights.js and the underlying Flight schema in backend/Flight.js. It covers listing flights, fetching a single flight with detections, and fetching a single detection by flight event window.
The flight model
The Flight model maps to dbo.tblFlightDetail with timestamps: false.
Properties
- Name
id- Type
- string
- Description
Primary key for a flight row.
- Name
OAGFlight- Type
- string
- Description
OAG flight identifier.
- Name
Location- Type
- string
- Description
Location identifier.
- Name
CameraID- Type
- string
- Description
Camera identifier used when querying detections.
- Name
Gate- Type
- string
- Description
Gate for the flight.
- Name
FlightType- Type
- string
- Description
Flight type.
- Name
Flight- Type
- string
- Description
Flight number.
- Name
Airport- Type
- string
- Description
Airport code.
- Name
TailNumber- Type
- string
- Description
Aircraft tail number.
- Name
Category- Type
- string
- Description
Flight category.
- Name
Ddate- Type
- string
- Description
Departure date filter field.
- Name
FlightDateTime- Type
- date
- Description
Flight datetime.
- Name
LandedDateTime- Type
- date
- Description
Landing datetime.
- Name
FlightId- Type
- string
- Description
Alternate flight identifier.
- Name
AirlineCode- Type
- string
- Description
Airline code used in filtering and access checks.
- Name
ACType- Type
- string
- Description
Aircraft type.
- Name
UniqueKey- Type
- string
- Description
Additional unique key.
- Name
TakeOffDateTime- Type
- date
- Description
Takeoff datetime.
- Name
ACHoldOutStart- Type
- date
- Description
Start time for AC hold-out.
- Name
ACHoldOutEnd- Type
- date
- Description
End time for AC hold-out.
- Name
AircraftArrivingStart- Type
- date
- Description
Start time for aircraft arriving.
- Name
AircraftArrivingEnd- Type
- date
- Description
End time for aircraft arriving.
- Name
AircraftDepartingStart- Type
- date
- Description
Start time for aircraft departing.
- Name
AircraftDepartingEnd- Type
- date
- Description
End time for aircraft departing.
- Name
AircraftRunwayStart- Type
- date
- Description
Start time for aircraft runway event.
- Name
AircraftRunwayEnd- Type
- date
- Description
End time for aircraft runway event.
- Name
AircraftStationaryStart- Type
- date
- Description
Start time for aircraft stationary.
- Name
AircraftStationaryEnd- Type
- date
- Description
End time for aircraft stationary.
- Name
BeltLoaderStart- Type
- date
- Description
Start time for belt loader.
- Name
BeltLoaderEnd- Type
- date
- Description
End time for belt loader.
- Name
CateringTruckStart- Type
- date
- Description
Start time for catering truck.
- Name
CateringTruckEnd- Type
- date
- Description
End time for catering truck.
- Name
ChocksOnStart- Type
- date
- Description
Start time for chocks on.
- Name
ChocksOnEnd- Type
- date
- Description
End time for chocks on.
- Name
FuelhoseConnectedStart- Type
- date
- Description
Start time for fuelhose connected.
- Name
FuelhoseConnectedEnd- Type
- date
- Description
End time for fuelhose connected.
- Name
GPUConnectedStart- Type
- date
- Description
Start time for GPU connected.
- Name
GPUConnectedEnd- Type
- date
- Description
End time for GPU connected.
- Name
JBExtendA3Start- Type
- date
- Description
Start time for JBExtendA3.
- Name
JBExtendA3End- Type
- date
- Description
End time for JBExtendA3.
- Name
JetbridgeExtendingStart- Type
- date
- Description
Start time for jetbridge extending.
- Name
JetbridgeExtendingEnd- Type
- date
- Description
End time for jetbridge extending.
- Name
JetbridgeRetractingStart- Type
- date
- Description
Start time for jetbridge retracting.
- Name
JetbridgeRetractingEnd- Type
- date
- Description
End time for jetbridge retracting.
- Name
PCAConnectedStart- Type
- date
- Description
Start time for PCA connected.
- Name
PCAConnectedEnd- Type
- date
- Description
End time for PCA connected.
- Name
PersonInEnvelopeStart- Type
- date
- Description
Start time for person in envelope.
- Name
PersonInEnvelopeEnd- Type
- date
- Description
End time for person in envelope.
- Name
SuitecaseStart- Type
- date
- Description
Start time for suitecase event.
- Name
SuitecaseEnd- Type
- date
- Description
End time for suitecase event.
- Name
PushTruckConnectedStart- Type
- date
- Description
Start time for push truck connected.
- Name
PushTruckConnectedEnd- Type
- date
- Description
End time for push truck connected.
- Name
ConeStart- Type
- date
- Description
Start time for cone event.
- Name
ConeEnd- Type
- date
- Description
End time for cone event.
- Name
JBInSafetyEnvelopeStart- Type
- date
- Description
Start time for JB in safety envelope.
- Name
JBInSafetyEnvelopeEnd- Type
- date
- Description
End time for JB in safety envelope.
- Name
CargoOpenStart- Type
- date
- Description
Start time for cargo open.
- Name
CargoOpenEnd- Type
- date
- Description
End time for cargo open.
- Name
LoaderStart- Type
- date
- Description
Start time for loader event.
- Name
LoaderEnd- Type
- date
- Description
End time for loader event.
- Name
JetbridgeConnectedStart- Type
- date
- Description
Start time for jetbridge connected.
- Name
JetbridgeConnectedEnd- Type
- date
- Description
End time for jetbridge connected.
- Name
AircraftFullTurnStart- Type
- date
- Description
Start time for aircraft full turn.
- Name
AircraftFullTurnEnd- Type
- date
- Description
End time for aircraft full turn.
- Name
APUOnStart- Type
- date
- Description
Start time for APU on.
- Name
APUOnEnd- Type
- date
- Description
End time for APU on.
- Name
DeplaneStart- Type
- date
- Description
Start time for deplane.
- Name
DeplaneEnd- Type
- date
- Description
End time for deplane.
- Name
BoardingStart- Type
- date
- Description
Start time for boarding.
- Name
BoardingEnd- Type
- date
- Description
End time for boarding.
- Name
FuelPresentStart- Type
- date
- Description
Start time for fuel present.
- Name
FuelPresentEnd- Type
- date
- Description
End time for fuel present.
- Name
CargoOnOffLoadingStart- Type
- date
- Description
Start time for cargo on/off loading.
- Name
CargoOnOffLoadingEnd- Type
- date
- Description
End time for cargo on/off loading.
- Name
TowbarConnectedStart- Type
- date
- Description
Start time for towbar connected.
- Name
TowbarConnectedEnd- Type
- date
- Description
End time for towbar connected.
- Name
AircraftDoorOpenStart- Type
- date
- Description
Start time for aircraft door open.
- Name
AircraftDoorOpenEnd- Type
- date
- Description
End time for aircraft door open.
- Name
PreArrivalFODStart- Type
- date
- Description
Start time for pre-arrival FOD.
- Name
PreArrivalFODEnd- Type
- date
- Description
End time for pre-arrival FOD.
- Name
MarshallPresentStart- Type
- date
- Description
Start time for marshall present.
- Name
MarshallPresentEnd- Type
- date
- Description
End time for marshall present.
- Name
PaxstairsConnectedStart- Type
- date
- Description
Start time for paxstairs connected.
- Name
PaxstairsConnectedEnd- Type
- date
- Description
End time for paxstairs connected.
- Name
TowableUnitStart- Type
- date
- Description
Start time for towable unit.
- Name
TowableUnitEnd- Type
- date
- Description
End time for towable unit.
- Name
WingwalkerStart- Type
- date
- Description
Start time for wingwalker.
- Name
WingwalkerEnd- Type
- date
- Description
End time for wingwalker.
- Name
BeltLoaderFrontStart- Type
- date
- Description
Start time for belt loader front.
- Name
BeltLoaderFrontEnd- Type
- date
- Description
End time for belt loader front.
- Name
BeltLoaderRearStart- Type
- date
- Description
Start time for belt loader rear.
- Name
BeltLoaderRearEnd- Type
- date
- Description
End time for belt loader rear.
List all flights
Returns a paginated list of flights that the authenticated user is allowed to access.
Query parameters
- Name
airlineCode- Type
- string
- Description
Filter by
AirlineCode.
- Name
departureDate- Type
- string
- Description
Filter by
Ddate.
- Name
flightNumber- Type
- string
- Description
Filter by
Flight.
- Name
location- Type
- string
- Description
Filter by
Airport.
- Name
gate- Type
- string
- Description
Filter by
Gate.
- Name
tailNumber- Type
- string
- Description
Filter by
TailNumber.
- Name
offset- Type
- integer
- Description
Pagination offset. Default:
0.
- Name
limit- Type
- integer
- Description
Page size. Default:
25.
cURL
curl -G https://api.synapticaviation.io/v2/flights \
-H "Authorization: Bearer {token}" \
-d airlineCode="NK" \
-d location="FLL" \
-d departureDate="2023-01-05" \
-d offset=0 \
-d limit=25
Each object in data contains the full flight record (all fields from the Flight model).
The response example below is abbreviated for readability.
Abbreviated response example
{
"meta": {
"count": 1
},
"data": [
{
"id": "20499923",
"Gate": "G13",
"Flight": "615",
"Airport": "FLL",
"TailNumber": "N526NK",
"AirlineCode": "NK",
"FlightDateTime": "2022-11-01T00:34:00.000Z",
....
}
]
}
Get flight by ID with detections
Returns one flight record. The API appends a detections array by searching the detections table using CameraID and the computed overall flight start/end times.
Path parameters
id: flight ID
cURL
curl -X GET https://api.synapticaviation.io/v2/flights/{id} \
-H "Authorization: Bearer {token}"
Response
{
"id": "20499923",
"Gate": "G13",
"Flight": "615",
"Airport": "FLL",
"AirlineCode": "NK",
"detections": [
{
"VideoURL": "videourl.mp4",
"VideoType": "mp4",
"DateAdded": "2022-11-01T00:34:04.000Z"
}
]
}
Get one video by flight event
Returns a single detection for a specific event window.
The API resolves <flightProperty>Start and <flightProperty>End from the flight row and searches detections within that interval.
Path parameters
id: flight IDflightProperty: event base name (for exampleAircraftArriving,JetbridgeExtending,PCAConnected)
cURL
curl -X GET https://api.synapticaviation.io/v2/flights/{id}/{flightProperty} \
-H "Authorization: Bearer {token}"
Response
{
"VideoURL": "videourl.mp4",
"VideoType": "mp4",
"DateAdded": "2022-11-01T00:34:04.000Z"
}
No video found response
{
"VideoURL": null,
"VideoType": null,
"DateAdded": null
}
Authorization and access control
- All endpoints require a bearer token (
checkTokenmiddleware). - Access is enforced using user access rows by
airline,location, orgate. - If the user has no access rows, the API returns
403. /:idand/:id/:flightPropertyreturn404when the flight is not found.
Live Flight Data
If you're logged in, you can see live flight data from the API below:
Authentication Required
To view live flight data, please sign in to your account. This feature requires authentication to access the API.
Flight Video Viewer
If you're logged in, you can view videos for specific flights below:
Authentication Required
To view flight videos, please sign in to your account. This feature requires authentication to access the API.
