<< View previous version | view page history | view next version >>
More from this API
The basic XML structure returned by a request (consistent with the available data) is:
<fai>
<members>
<member/>....
</members>
<cima>
<classes>
<class/>....
</classes>
<delegates>
<delegate/>....
</delegates>
<records>
<record/>....
</record>
</cima>
</fai>
The URL contains the requested parameters, basically what is in the URL after the ?
The required parameter is data, and the value is in dot notation, thus a typical url will look like URI?data=return.this.data
The dot notated value is in the form path.optional_path.dataset. and is a reflection of the eventual XML structure. fai is assumed, and thus omitted. a typical query would be ?data=members.all or data=cima.delegates.all For subsets, see the reference below.
Parameters can be concantenated with ampersands &, as in URI?data=return.this.data&data=return.that.data.too
All data returned in a single request is always contained within a single <fai> </fai> structure. This allows consistency within applications using the data.
<members/>
FAI member nations
Method | GET |
Query string | data=members.dataset |
Dataset | all or any region, eg Europe, Asia, America Etc. |
Notes | This API supports subsets of FAI members by continent, so ?data=members.europe will get European FAI members. It will also do partial matches, so ?data=members.asia will retrieve get from East Asia and South Asia. 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 |
The examples above are just a small subset of what is available from an API like this, for example records for all microlight and paramotor classes are available, eg ?data=cima.records.PL1E will get you class PL1E. (inspect the list of classes and use the <class_name> field.)
This API is also set up to get other subsets, for example ?data=cima.records.P will get you all records in the paramotor classes or ?data=cima.records.1E will get you all records in electric classes flown solo.
You can do the same with the class list, as in ?data=cima.classes.P and ?data=cima.classes.1E
With the keyword "all" you can get the lot, as in: ?data=cima.classes.all and ?data=cima.records.all In this latter case it is quite a big data set which might take a bit of processing, hence the options above are probably more useful most of the time.
You can get two or more datasets simultaneously by concantenating them with ampersands: & as in: ?data=cima.records.WL1&data=cima.records.PL1E
Members
This API supports subsets of FAI members by continent, so ?data=members.europe will get European FAI members. It will also do partial matches, so ?data=members.asia will retrieve members from East Asia and South Asia.
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
CIMA Delegates
As with FAI members, This API supports subsets by continent for delegates the same as it does for FAI members, so
?data=cima.delegates.europe will get European CIMA Delegates.
Making it pretty
This kind of data is primarily there for people to automatically download and re-process in useful and interesting ways but XSLT transformations can also be used directly to make it look pretty in a browser, and this is implemented in this API by adding &xsl=1 to the URL, for example?data=members.america&xsl=1 displays all FAI Members from the Americas in a user-friendly format.