phpDocumentor UserAPI
[ class tree: UserAPI ] [ index: UserAPI ] [ all elements ]
Prev Next

Using CAT access API

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

Table of Contents

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 linkt 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. Most calls require an id argumant 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

  • listLanguages
  • listCountries
  • listAllIdentityProviders
  • listIdentityProviders
  • listProfiles
  • profileAttributes
  • listDevices
  • generateInstaller
  • downloadInstaller
  • sendLogo

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 failes 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 decriptions of individual actions for more information on data structure.

Actions in detail

listLanguages

mandatory arguments

none

optional arguments

none

data

Array of triples: {"id", "display", "locale"}.


mandatory arguments

none

optional arguments

lang

data

Array of tuples: {"id", "display"}.


listAllIdentityProviders

mandatory arguments

none

optional arguments

lang

data

The main purpose of this action is to provide listing for DiscoJusce, therefore the structure of the result is talored to DJ needs. The result is an array of tupples {"entityID","title","country","geo","icon","id"}. geo and icon are optional. id is provided for conformance reasons, but is just a copy of entityID. geo can be either a {"lon", "lat"} touple or an array of such tupples.


listIdentityProviders

mandatory arguments

id - the identifier of a country to be listed.

optional arguments

lang

data

Array of tuples: {"id", "display"}.


listProfiles

mandatory arguments

id - the identifier of an IdP

optional arguments

lang

sort - if equal to 1 sort profiles by name (case-ignore)

Array of tuples: {"id", "display", "idp_name", "logo"}. logo can be 0 or 1 and shows if logo is available.


profileAttributes

mandatory arguments

id - the identifier of the profile to be shown

optional arguments

lang

data

Array of tuples: {"local_email","local_phone","local_url","description","devices"}. All local_ entries and description are optional. devices is an array of touples {"id","display","status","redirect", "eap_customtext","device_customtext"}.


listDevices

mandatory arguments

id - the identifier of the profile for which the devices will be listed

optional arguments

lang

data

array of touples {"id","display","status","redirect", "eap_customtext","device_customtext"}.


generateInstaller

mandatory arguments

id - identifier of the device; profile - identifier of the profile

optional arguments

lang

data

array of touples {"profile","device","link", "mime"}.


downloadInstaller

mandatory arguments

id - identifier of the device; profile - identifier of the profile

optional arguments

lang; generatedfor - either 'user' or 'admin' - defaults to user

returned data

installer file


sendLogo

mandatory arguments

id - the identifier of the identity provider

optional arguments

lang

returned data

logo image


Prev   Next
Writing device modules for the eduroam Configuration Assistant Tool

Documentation generated on Tue, 06 Oct 2015 06:11:16 +0000 by phpDocumentor 1.4.4