Access and signing statements
:: services/statements module

These API methods allow you to check and sign statements.

Methods

awaiting_statements (internal) Get all awaiting statement declarations. (administrative)
statement (internal) Get information of a single statement. (administrative)
statement_declaration (internal) Get single statement declaration. (administrative)
statement_declarations (internal) Get information of a multiple statement declarations. (administrative)
statements (internal) Get information of a multiple statements. (administrative)
user_status BETA Check if user has all required declaractions and is allowed to use USOS. (administrative)

services/statements/awaiting_statements

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: 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.

This method is INTERNAL. It is intended to be used only internally, by USOS API itself. It's documentation is visible only in DEBUG mode and there's a substantial probability it won't stay backwards-compatible.

Get all awaiting statement declarations.

user_id required ID of user
fields optional

Default value: id

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

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. Token is not required.

Returned value:

List of statement declarations, as defined in the statement_declaration method.

services/statements/statement

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: 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.

This method is INTERNAL. It is intended to be used only internally, by USOS API itself. It's documentation is visible only in DEBUG mode and there's a substantial probability it won't stay backwards-compatible.

Get information of a single statement.

Note that either statement_id or statement_code and version must be passed, but not both.

statement_id optional ID of the statement
statement_code optional code of the statement
version optional version of the statement
fields optional

Default value: id|title|content

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.

Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required.

Returned value:

A dictionary of selected fields and their values.

Available fields:

  • id - ID of the statement;

  • code - code of the statement;

  • version - version of the statement;

  • title - LangDict, statement title;

  • content - LangDict, statement content;

  • statement_type - statement type.

    Possible values:

    • clause

    • rules

    • pledge

  • effect_start_date - date in which statement start to be in effect;

  • effect_end_date - date from which statement is no longer in effect;

  • can_be_rejected - boolean, indicates if user is allowed to reject the statement.

Thrown errors:

  • object_not_found - some of the referenced objects do not exist.

    Possible reasons:

    • statement_not_found - statement was not found.

  • param_invalid - parameter has invalid value.

    Possible reasons:

    • id_and_statement_code_together - both id and statement_code were specified.

  • param_missing - parameter is missing.

    Possible reasons:

    • no_id - either statement_id or statement_code and version must be passed;

    • no_statement_code - version was passed, but no statement_code;

    • no_version - statement_code was passed, but no version.

services/statements/statement_declaration

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: 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.

This method is INTERNAL. It is intended to be used only internally, by USOS API itself. It's documentation is visible only in DEBUG mode and there's a substantial probability it won't stay backwards-compatible.

Get single statement declaration.

declaration_id required ID of declaration
fields optional

Default value: id

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.

Plus required standard OAuth Consumer signing arguments: oauth_consumer_key, oauth_nonce, oauth_timestamp, oauth_signature, oauth_signature_method, oauth_version. Token is not required.

Returned value:

A dictionary of selected fields and their values.

Available fields:

  • id - ID of the declaration;

  • statement - statement regarding declaration.

    This field references objects returned by statement method. See its returns section for possible subfields.

  • decision_date - date when decision about statement was made by user or null when user has not decided yet;

  • decision - user decision about statement.

    Possible values:

    • no_decision_yet - user has not decided yet

    • accepted - user has accepted statement

    • rejected - user has rejected statement

    • waived - user does not have to decide

  • students_programme - programme related to the statement or null when the statement is not related to any programme.

    This field references objects returned by services/progs/student_programme method. See its returns section for possible subfields.

  • decision_deadline - date until when user has to make declaration or null if not specified;

  • effect_end_date - date when declaration is no longer under effect or null if not specified.

services/statements/statement_declarations

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: 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.

This method is INTERNAL. It is intended to be used only internally, by USOS API itself. It's documentation is visible only in DEBUG mode and there's a substantial probability it won't stay backwards-compatible.

Get information of a multiple statement declarations.

declaration_ids required

Pipe-separated list of declaration IDs.

fields optional

Default value: id

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

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. Token is not required.

Returned value:

A dictionary: your declaration_ids will be mapped to dictionary's keys, and each value will contain the description of one statement declaration, as defined in the statement_declaration method.

For invalid declaration_ids (declarations which do not exist) null will be returned (instead of the declaration object).

services/statements/statements

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: 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.

This method is INTERNAL. It is intended to be used only internally, by USOS API itself. It's documentation is visible only in DEBUG mode and there's a substantial probability it won't stay backwards-compatible.

Get information of a multiple statements.

statement_ids required

Pipe-separated list of statement IDs.

fields optional

Default value: id|title|content

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

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. Token is not required.

Returned value:

A dictionary: your statement_ids will be mapped to dictionary's keys, and each value will contain the description of one statement, as defined in the statement method.

For invalid statement_ids (statements which do not exist) null will be returned (instead of the statement object).

services/statements/user_status

Administrative: This method requires a proper Administrative Consumer Key. Contact us to get one.

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: 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.

This is a BETA method. We're looking for beta-testers. Until we find them, there's a substantial probability it won't stay backwards-compatible! If you are planning on using this method, please let us know. Then, we will work with you and move it out of beta as soon as we can.

Check if user has all required declaractions and is allowed to use USOS.

user_id required ID of user
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. Token is not required.

Returned value:

A dictionary of the following format:

  • allowed - boolean, true if user has all required declarations and is allowed to use USOS.
  • reason - reason why user is not allowed to use USOS.
    Possible values:
    • awaiting_declarations - user has not made all declarations
    • no_pledge - user has not pledged on any active programmes
    • null - user is allowed to use USOS
USOS API ver. 6.1.2.0-3, 7f29f74c, dirty (2020-10-21)