Accessing USOS API server data
:: services/apisrv module

These API methods allow you to access information on the USOS API server installation, and also retrieve some basic data on all the other official USOS API installations.

Methods

consumer Get information on the Consumer.
installation Get information on this USOS API installation.
installations Get a list of all public USOS API installations.
now Get current USOS API time.

services/apisrv/consumer

Consumer: required Token: optional Scopes: n/a SSL: not required
URLs of the methods are hidden, because this installation is the mother server.
Click here for the list of all public USOS API installations.

Get information on the Consumer.

Currently, you can use this method only to get information on a single Consumer - yourself. Simply sign your request with OAuth in order to verify who you are. You may also pass an Access Token along to get some extra information on the permissions granted to you by the user.

Important: You are allowed to call this method via the proxy method, but only the token_scopes field will be available (provided that your proxy is signing requests with Access Tokens, if it is not, then you will get null). Make sure you're asking only for the token_scopes field, otherwise you will get an error.

fields required Pipe-separated list of fields you're interested with.
format optional

Default value: json

Format in which to return values. See supported output formats.
callback optional Required only if you've chosen jsonp as a return format.
Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Plus optional oauth_token for Token authorization.

Returned value:

A dictionary of fields you have asked for. Available fields are:

  • name - the application name you have provided when you have registered for your Consumer Key,
  • url - the application URL which you have provided when you have registered for your Consumer Key or null if you didn't provide any,
  • email - the email address you have provided when you have registered for your Consumer Key,
  • date_registered - datetime string, the date when you have registered your Consumer Key,
  • administrative_methods - the list of names of USOS API methods you've been granted administrative access to,
  • token_scopes - the list of scopes which the user have granted you access to or null if you didn't provide an Access Token with your request.

services/apisrv/installation

Consumer: ignored Token: ignored Scopes: n/a SSL: not required
URLs of the methods are hidden, because this installation is the mother server.
Click here for the list of all public USOS API installations.

Get some basic information on this USOS API installation.

fields optional

Default value: base_url|version|usos_schema_version|institution_name|contact_emails

Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section.

format optional

Default value: json

Format in which to return values. See supported output formats.

callback optional

Required only if you've chosen jsonp as a return format.

No additional OAuth arguments are required. If you provide any, they will be ignored.

Returned value:

A dictionary of selected fields and their values.

Available fields:

  • base_url - base URL of this installation.

    For backward compatibility, this will always start with the "http://" protocol. You should use "https://" in your method calls though!
  • version - version string of the API used by this installation, or null if unknown;

  • usos_schema_version - version string of the USOS database used by this installation;

  • institution_name - a LangDict object with the name of the institution which is the owner of this installation, or null if it is unknown;

  • institution - the "primary" faculty object.

    This will contain a single selected faculty object, as described in the services/fac/faculty method. This primary institution faculty is also often a common ancestor of most of the faculties is the faculty forest (but sometimes it is not).

  • contact_emails - a list of strings, email addresses of local USOS API administrators..

services/apisrv/installations

Consumer: ignored Token: ignored Scopes: n/a SSL: not required
URLs of the methods are hidden, because this installation is the mother server.
Click here for the list of all public USOS API installations.

Get a list of all public USOS API installation servers (including this one).

There are many institutions that use USOS API. Each of them has it's own database and it's own USOS API server. This method allows you to access a list of all public USOS API servers.

format optional

Default value: json

Format in which to return values. See supported output formats.
callback optional Required only if you've chosen jsonp as a return format.
No additional OAuth arguments are required. If you provide any, they will be ignored.

Returned value:

A list of dictionaries, each dictionary in of the same structure that the one returned in the installation method, but the number of fields is limited to the following:

  • base_url
  • version
  • institution_name
  • contact_emails

services/apisrv/now

Consumer: ignored Token: ignored Scopes: n/a SSL: not required
URLs of the methods are hidden, because this installation is the mother server.
Click here for the list of all public USOS API installations.
Get the current USOS API time. Your application might call it periodically in order to determine time offset of our clocks. Exact timing matters in some cases (like when a registration starts).
format optional

Default value: json

Format in which to return values. See supported output formats.
callback optional Required only if you've chosen jsonp as a return format.
No additional OAuth arguments are required. If you provide any, they will be ignored.

Returned value:

A DateTime string (first 19 characters), followed by a dot and a 6-digit fractional part of a second ("yyyy-mm-dd hh:mm:ss.dddddd"). This represents the current USOS API server local time (all DateTime strings API methods return are in local time, unless stated otherwise).
USOS API ver. 6.1.2.0-bc1aa53 (2016-06-07)