Security
The API requires a login, either:
- username: anonymous password : blank
- For enhanced data, use your wiki login credentials. What enhanced data is supplied depends on what groups you are a member of in the wiki.
Authentication is standard HTTP basic, in other words the username and password are not encrypted, but the API is set up to only work with SSL/TLS on the standard https port 443 so all communication with the API is done from end to end down a very secure encrypted 'tunnel'.
Query parameters
Parameters describing the data you want to receive are sent to the API in the form of a GET, in other words it is a page request like any other page request on the internet and the URL contains the requested parameters after the ? and this is known as the query. POST requests, in other words form submissions, are not currently supported.
Query parameters can be concantenated with ampersands &, as in URI?data=return.this.data&data=return.that.data.too
It does not matter what order query parameters are in; URI?data=return.this.data&data=return.that.data.too will return the same data in the same order as URI?data=return.that.data.too&data=return.this.data.
Query parameters should be properly URL encoded, so the value you need to find FAI members in South America, (which has a space in it), should be: ?data=members.south%20america
Query parameter | Required | |
---|---|---|
data | yes | The basic parameter which defines what data to retrieve.
ValuesThe value is in dot notation, thus a typical url will look like URI?data=return.this.data Example ?data=members.all&data=cima.delegates.all |
xsl | no | Loads a XSLT stylesheet with the XML data so it is nicely presented in a browser. (do not confuse this parameter with xls).
Values1 : Loads selected requested data nicely formatted in sortable tables. Example |
logout | no | Forces a logout.
Values1 : Logs the current user out and the login dialog appears. Example |
The XML structure
All data returned in a single request is always contained within a single <fai> </fai> structure. This allows consistency within applications using the data.
For simplicity, the schema is laid out so only nodes which can contain sub-nodes have attributes (eg itemcount)
What is contained within the <fai/> structure depends on the request, but (consistent with the available data) can be:
<fai copyright="FAI" href="http://www.fai.org" timestamp="iso timestamp, always UTC" user="person who is logged in" version="current ver."> <members itemcount="number of member items" validity="a comment on validity (optional)"> <member/>.... </members> <cima> <classes itemcount = "number of class items"> <class/>.... </classes> <delegates itemcount = "number of delegate items" validity="a comment on validity (optional)"> <delegate/>.... </delegates> <records itemcount = "number of record items"> <record/>.... </records> </cima> </fai>
<members/>
FAI member nations
Method | GET |
Query string | data=members.dataset |
Dataset | all or any region, eg Europe, Asia, America Etc. |
Notes | Only subsets of FAI members by continent are supported, so ?data=members.europe![]() ![]() Note that in all cases the URL must be properly encoded, so the url for South America, which has a space in it, should be: ?data=members.south%20america ![]() |
<classes/>
FAI commission aircraft classes
Method | GET |
Query string | data=commission.classes.dataset |
Dataset | all or any part of the class name eg P or PL or PL1 Etc. |
Notes | Data is only available for CIMA The subset must be a contiguous part of the class name, thus ?data=cima.classes.P1 ![]() ![]() |
<delegates/>
FAI commission delegates
Method | GET |
Query string | data=commission.delegates.dataset |
Dataset | all or any region, eg Europe, Asia, America Etc. |
Notes | Data is only available for CIMA Only subsets of delegates by continent are supported, so ?data=cima.delegates.europe ![]() ![]() |
<records/>
FAI records
Method | GET |
Query string | data=commission.records.dataset |
Dataset | all or any part of the class name eg P or PL or PL1 Etc. |
Notes | Data is only available for CIMA The subset must be a contiguous part of the class name, thus ?data=cima.records.P1 ![]() ![]() To get two or more classes simply concantenate the request; ?data=cima.records.PL1&data=cima.records.PL2 ![]() The all dataset is rather large and not recommended. |
Errors
There are essentially two types of error:
- Page status errors.
- If a dataset is served correctly the recipient will receive a normal 200 OK status code.
- The most likely alternative status code will be 401 Unauthorized indicating the login is incorrect or has timed out.
- Data production errors
- These are output within the XML structure <error/> and attempt to describe the problem.