CAT

Using CAT access API

Author: Tomasz Wolinewicz, twoln@umk.pl

We document how you can access CAT data without using the provided GUIs

Introduction

Various programs may want to access CAT data thus becoming another CAT UI. CAT access API is here to enable and ease this access. Please be aware that CAT data is restricted by Terms of Use. The link to ToU is always sent within CAT results. Please respect the rules.

Data access is provided by HTTP calls to the script user/API.php. You may use both GET and POST. The main mandatory argument is action which tells CAT what you require. Since most data is language-specific, you should normally specify the lang argument as well. The list of available languages and their identifiers is available via the listLanguages call. In previous versions of CAT, most actions used and id argument with its meaning depending on the context. This turned out to be impractical, therefore starting from version 1.2 the id argument has been replaced by various arguments whose names are self-explanatory. The old behaviour is still supported for backwards compatibility, but may be removed in the future. Also for backwards compatibility, by default the API is run in version 1 mode, you can specify version 2 behaviour by setting api_version to value 2,

This documentation is for version 2 of the API.

Most calls require an additional argument as well, where you need to provide an internal CAT identifier of the object that you require. The values of these identifiers are available via the CAT list calls.

List of available actions

JSON structure

With the exception of sendLogo, which sends an image, data returned by each called is sent as a JSON encoded array. The main array has three entries: status, data and tou. The status entry returns the success or failure of the call. If status equals 0 then the call fails and data could contain an error message. If status equals 1 then data will contain all returned information. The tou entry is just the Terms of Use statement.

In most cases data is an array listing requested objects like languages, countries, IdPs, profiles. See the descriptions of individual actions for more information on the data structure.

Actions in detail