This page is dedicated to developers wishing to interact with flightear-atc
The API queries are made directly through the URL. Every query has an answer, in an XML format (not JSON).
Current API version is 2.3. The URL to access the API is:
http://flightgear-atc.alwaysdata.net/dev2017_04_28.phpThe name of the query and the parameters are mentioned after the ".php".
There are two kinds of queries : GET and POST.
If any query is not correct, an error message will appear. Example of error message :
ERR_VAR
getATCSessions requires limitDate
Error types are :
ERR_VAR
an error occured on variables (missing variables are shown).ERR_VAR1
a mandatory variable is missing.ERR_VAR2
several mandatories variables are missing.WRONG_IDENT
the email/password couple is not correct.INVALID_FLIGHTPLAN
the information given to file/edit a flight plan are not correct. Check that dates (YYYY-MM-DD) and times (HH:MM:SS) are in the correct format.
For POST queries you will need to sign in.
For this purpose please sign in here. Enter your email address and choose a password.
The email
and password
will be asked for any POST query.
?isAirportControlled&airport=...&date=YYYY-MM-DD&time=HH:MM:SS
Check if an airport is controlled at a given date
and time
.
TEST with isAirportControlled&airport=EDDF&date=2017-04-28&time=20:30:00
Mandatory parameters
airport : airport ICAO code (example : LFML, KSFO, EGLL, ...)
date : in YYYY-MM-DD format
time : in HH:MM:SS format
Optional parameters
-
Answer example
EDDF 2017-04-28 1
?getFlightplans[&callsign=...[&date=YYYY-MM-DD[&airport=...[&status=...[&limit=...]]]]]
Retrieve flight plans for a given pilot callsign
AND/OR a given date
AND/OR a given airport
AND/OR a given status
limited by limit
.
TEST with getFlightplans&date=2017-04-28&airport=EDDF&limit=1
Mandatory parameters
getFlightplans
Optional parameters
callsign : pilot callsign
date : flightplan's departure date
airport : departure or arrival airport ICAO code
status : flightplan status ("filed" / "open" / "close")
limit : maximum number of flightplans to retrieve (default : 30 ; maximum : 80)
Answer example
3160 ABC123 DLH DLH141 EDDS EDDF FL200 2017-04-28 2017-04-28 18:20:00 18:50:00 A320 IFR ABC123 filed 0
?getFlightplanDetails&flightplanId=...
Get all flightplan information for a given flightplanId
.
TEST with getFlightplanDetails&flightplanId=3160
Mandatory parameters
getFlightplanDetails
flightplanId : flightplan ID
Optional parameters
-
Answer example
3160 ABC123 DLH DLH141 EDDS EDDF FL200 2017-04-28 2017-04-28 18:20:00 18:50:00 A320 IFR ABC123 filed 0
?getATCSessions&limitDate=YYYY-MM-DD
Get all ATC sessions before limitDate
.
TEST with getATCSessions&limitDate=2024-12-22
Mandatory parameters
getATCSessions
limitDate : limit date in YYYY-MM-DD format
Optional parameters
-
Answer example
2877 SBEG 2017-05-01 15:00:00 21:00:00 118.30 Portugues 4000 10 110.30 105 http://www.aisweb.aer.mil.br/ http://inutiles.byethost16.com/flightgear/modules/brazukaairlines/Evento/
?testAuthentication&email=...&password=...
Check if your email
and password
work fine.
TEST with ?testAuthentication&email=abc&password=abc
Mandatory parameters
email : your email
password : your password
Optional parameters
-
Answer example
EDDF 2017-04-28 1
?newAtcSession&email=...&password=...&date=YYYY-MM-DD&beginTime=HH:MM:SS&endTime=HH:MM:SS&airportICAO=... [&fgCom=...[&teamSpeak=...[&docsLink[&remarks=...]]]]
Creates a new ATC session at a given date
according specified airportICAO
, beginTime
and endTime
.
Warning: as all POST queries, you'll need to create an account here and use your login information into the query.
Mandatory parameters
newAtcSession
email : your email
password : your password
date : date in YYYY-MM-DD format
beginTime : HH:MM:SS of the begin of the ATC session
endTime : HH:MM:SS of the end of the ATC session
airportICAO : ICAO code of the airport
Optional parameters
fgCom : FGCom frequency
teamspeak : Information regarding team speak client
docsLink : link for additional documentation
remarks : any useful information
Answer example
2894 TEST 2017-05-10 20:00:00 21:00:00 N/A N/A N/A N/A
?fileFlightplan&email=...&password=...&callsign=...&dateDeparture=YYYY-MM-DD&departureAirport=...&departureTime=HH:MM:SS&arrivalAirport=...&arrivalTime=HH:MM:SS [&airline=...[&flightNumber=...[&alternateDestination=...[&cruiseAltitude=...[&trueAirspeed=...[&aircraft=...[&soulsOnBoard=...[&fuelTime=...[&pilotName=...[&waypoints=...[&category=IFR/VFR[&comments=...]]]]]]]]]]]]
Creates a new flight plan for given information.
Warning: as all POST queries, you'll need to create an account here and use your login information into the query.
Mandatory parameters
fileFlightplan
email : your email
password : your password
callsign : pilot callsign
dateDeparture : date in YYYY-MM-DD format
departureAirport : ICAO code of the departure airport
departureTime : HH:MM:SS of flight departure
arrivalAirport : ICAO code of the arrival airport
arrivalTime : HH:MM:SS of the flight arrival
Optional parameters
airline : name of the airline
flightNumber : flight number
alternateDestination : alternate airport ICAO code (for divert)
cruiseAltitude : cruise altitude or flight level
trueAirspeed : speed of the aircraft
aircraft : aircraft type/model
soulsOnBoard : number of people
fuelTime : autonomy of the aircraft
pilotName : name of the pilot
waypoints : waypoints during the flight
category : either VFR of IFR (Visual Flight Rules or Instrument Flight Rules)
comments : any useful information regarding the flight
Answer example
3171 _TEST LFML LFOK 2017-05-05 2017-05-05 20:00:00 22:00:00 filed
?editFlightplan&email=...&password=...&flightplanId=... [&callsign=...[&dateDeparture=YYYY-MM-DD[&departureAirport=...[&departureTime=HH:MM:SS[&arrivalAirport=...[&arrivalTime=HH:MM:SS[&airline=...[&flightNumber=...[&alternateDestination=...[&cruiseAltitude=...[&trueAirspeed=...[&aircraft=...[&soulsOnBoard=...[&fuelTime=...[&pilotName=...[&waypoints=...[&category=IFR/VFR[&comments=...]]]]]]]]]]]]
Edits the flightplanId
with the optional information.
Warning: as all POST queries, you'll need to create an account here and use your login information into the query.
Mandatory parameters
editFlightplan
email : your email
password : your password
flightplanId : flightplan ID
Optional parameters
callsign : pilot callsign
dateDeparture : date in YYYY-MM-DD format
departureAirport : ICAO code of the departure airport
departureTime : HH:MM:SS of flight departure
arrivalAirport : ICAO code of the arrival airport
arrivalTime : HH:MM:SS of the flight arrival
airline : name of the airline
flightNumber : flight number
alternateDestination : alternate airport ICAO code (for divert)
cruiseAltitude : cruise altitude or flight level
trueAirspeed : speed of the aircraft
aircraft : aircraft type/model
soulsOnBoard : number of people
fuelTime : autonomy of the aircraft
pilotName : name of the pilot
waypoints : waypoints during the flight
category : either VFR of IFR (Visual Flight Rules or Instrument Flight Rules)
comments : any useful information regarding the flight
Answer example
3171 _TEST LFML LFOK 2017-05-05 2017-05-05 20:00:00 22:00:00 filed 2017-04-29 10:00:00
?openFlightplan&email=...&password=...&flightplanId=...
Opens flightplanId
.
Warning: as all POST queries, you'll need to create an account here and use your login information into the query.
Mandatory parameters
openFlightplan
email : your email
password : your password
flightplanId : flightplan ID
Optional parameters
-
Answer example
3171 _TEST LFML LFOK 2017-05-05 2017-05-05 20:00:00 22:00:00 open 2017-04-29 10:00:00
?closeFlightplan&email=...&password=...&flightplanId=...
Closes flightplanId
.
Warning: as all POST queries, you'll need to create an account here and use your login information into the query.
Mandatory parameters
closeFlightplan
email : your email
password : your password
flightplanId : flightplan ID
Optional parameters
-
Answer example
3171 _TEST LFML LFOK 2017-05-05 2017-05-05 20:00:00 22:00:00 close 2017-04-29 10:00:00
?setVar&email=...&password=...&flightplanId=...&variable=...&value=[...]
This query allows one to add some custom information on a flight plan. Any variable and value can be created/modified.
Caution: if the variable already exists, this command will overwrite it.
Notice: leaving the value empty will unset the variable.
Warning: as all POST queries, you'll need to create an account here and use your login information into the query.
Mandatory parameters
editFlightplan
email : your email
password : your password
flightplanId : flightplan ID
variable : custom variable to set/overwrite
value : custom value to set/overwrite
(if empty, the variable is unset)
Optional parameters
-
Answer example
3171 _TEST LFML LFOK 2017-05-05 2017-05-05 20:00:00 22:00:00 close 2 2017-04-29 10:00:00