Events module
:: services/events2 module

TODO

Methods

add_recipient Add user to recipients list
delete_recipient Delete user from recipients list
delete_statement Delete statement
distribution_channel Get information about distribution channel
event_channel get information about assignment channel to event type
event_channel_preference Get user prefetences for given event type channel
event_preference get single user preference object
event_type Get information about event type
event_type_schedule get event type schedule details
event_types_index Get all events types
generate_one_time_code Generate and send one time code to user
generate_one_time_code2 Generate and send one time code to user
latest_notifications Get user's notifications
notification_channels_index List of all notifiaction channels
notifications_schedule Get notifications sending schedule details
notifications_schedule_index Get all available schedules
personalized_statements Filter statements
search_statements Filter statements
send_notification Send custom notification to selected user (administrative)
statement Get statement
update_event_channel Update event channel for selected event type
update_event_schedule update event type schedule
update_event_type Get information about event type
update_statement Update or insert statement
update_user_preference Update user preference object
user_preferences Get user preferences
validate_one_time_code Generate and send one time code to user

services/events2/add_recipient

Consumer: required Token: required Scopes: events SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/add_recipient

Add user to recipients list

statement_id required ID of a statement
user_id required ID of a 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. Plus required oauth_token for Token authorization.

Returned value:

List of recipients

services/events2/delete_recipient

Consumer: required Token: required Scopes: events SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/delete_recipient

Delete user from recipients list

statement_id required ID of a statement
user_id required ID of a 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. Plus required oauth_token for Token authorization.

Returned value:

List of recipients

services/events2/delete_statement

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/delete_statement

Delete statement

id required Statement id
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 optional 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:

Empty dict on success

services/events2/distribution_channel

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/distribution_channel

Get information about distribution channel

id required ID of channel
fields optional

Default value: id|name

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 optional 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 selected fields and their values.

Available fields:

  • id - Unique ID of distribution channel;

  • event_type - Event type that channel is assigned to.

    This field references objects returned by event_type method. See its returns section for possible subfields (only primary are allowed).

  • name - Name of event type.

services/events2/event_channel

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/event_channel

get information about assignment channel to event type

event_type_id required ID of event type
channel_id required ID of channel
fields optional

Default value: id|channel|event_type|is_enabled|is_mandatory|send_by_default|user_preferences

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 optional 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 selected fields and their values.

Available fields:

  • id - ID of event channel;

  • channel - Assigned channel.

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

  • event_type - Assigned event type.

    This field references objects returned by event_type method. See its returns section for possible subfields (only primary are allowed).

  • is_enabled - True if sending of this kind of events is enabled;

  • is_mandatory - If true, student cannot disable receiving events of this type;

  • send_by_default - If true, user that will receive this kind of events by default;

  • user_preferences - User preferences related to event_channel.

    This field references objects returned by event_preference method. See its returns section for possible subfields (only primary are allowed).

services/events2/event_channel_preference

Consumer: required Token: required Scopes: events SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/event_channel_preference

Get user prefetences for given event type channel

event_channel_id required ID of event channel
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 required oauth_token for Token authorization.

Returned value:

A dictionary of following fields and their values:

  • is_enabled - true if channell is enabled for user;

  • schedule - Chosen schedule for event.

services/events2/event_preference

Consumer: required Token: required Scopes: events SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/event_preference

get single user preference object

event_channel_id required Event type schedule id
fields optional

Default value: id|schedule|is_enabled|event_channel

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. Plus required oauth_token for Token authorization.

Returned value:

A dictionary of selected fields and their values.

Available fields:

  • Primary:

    • id - ID of an object;

    • schedule - Schedule.

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

    • is_enabled - boolean.

  • Secondary:

    • event_channel - Event channel.

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

services/events2/event_type

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/event_type

Get information about event type

id required ID of an event
fields optional

Default value: id|name|description|is_enabled|is_mandatory|send_by_default

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 optional 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 selected fields and their values.

Available fields:

  • Primary:

    • id - Unique ID of event type;

    • name - Name of event type;

    • description - Description of event type;

    • is_enabled - True if sending of this kind of events is enabled;

    • is_mandatory - If true, student cannot disable receiving events of this type;

    • send_by_default - If true, user that will receive this kind of events by default;

    • default_message - If defined this message will be used as default.

  • Secondary:

    • channels - List of related channels.

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

    • schedules - Schedules related to channells.

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

services/events2/event_type_schedule

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/event_type_schedule

get event type schedule details

event_type_schedule_id required Event type schedule id
fields optional

Default value: id|schedule|is_enabled

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 optional 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 selected fields and their values.

Available fields:

  • id - ID of an object;

  • schedule - Schedule.

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

  • is_enabled - boolean.

services/events2/event_types_index

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/event_types_index

Get all events types

fields optional

Default value: id|name|description|is_enabled|is_mandatory|send_by_default

Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section of event_type 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 optional 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:

List of all available types

services/events2/generate_one_time_code

Consumer: required Token: required Scopes: none SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/generate_one_time_code

Generate and send one time code to 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. Plus required oauth_token for Token authorization.

Returned value:

Unique token used to verification of generated code

services/events2/generate_one_time_code2

Consumer: required Token: required Scopes: none SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/generate_one_time_code2

Generate and send one time code to 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. Plus required oauth_token for Token authorization.

Returned value:

Dictionary of fields: id, message

services/events2/latest_notifications

Consumer: required Token: required Scopes: events SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/latest_notifications

Get user's notifications

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 required oauth_token for Token authorization.

Returned value:

List of objects

services/events2/notification_channels_index

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/notification_channels_index

List of all notifiaction channels

fields optional

Default value: id|name|description

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 optional 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 selected fields and their values.

Available fields:

  • id - ID of event channel;

  • name - Langdict object;

  • description - Langdict object.

services/events2/notifications_schedule

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/notifications_schedule

Get notifications sending schedule details

schedule_id required ID of schedule
fields optional

Default value: id|name|days

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 optional 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 selected fields and their values.

Available fields:

  • id - id of schedule;

  • name - langdict with short description of schedule;

  • days - notifications of given type will be send once per given number of days.

services/events2/notifications_schedule_index

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/notifications_schedule_index

Get all available schedules

fields optional

Default value: id|name|days

Selector of result fields you are interested in. The selector may contain any subset of fields, which are described in the returns section of notifications_schedule 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 optional 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:

List of all available schedules

services/events2/personalized_statements

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/personalized_statements

Filter statements

fields optional

Default value: id|primary_group|title|content|is_calendar|location|start|end|send_after|sent_at|is_personal|statement_type

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 optional 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:

List of filtered statements

services/events2/search_statements

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/search_statements

Filter statements

start optional

Default value: (empty string)

Return statements that ends after that date
end optional

Default value: (empty string)

Return statements that starts before that date
for_user optional

Default value: true

Return only statements addressed to access token issuer
fields optional

Default value: id|primary_group|title|content|is_calendar|location|start|end|send_after|sent_at|is_personal|statement_type

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 optional 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:

List of filtered statements

services/events2/send_notification

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

Consumer: required (administrative) Token: ignored Scopes: n/a SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/send_notification

Send custom notification to selected user

message_pl required Message in polish language that will be displayed to a user
user_id optional

Default value: (empty string)

User who will be notified
user_ids optional

Default value: (empty string)

List of users who will be notified. Note that parameters user_id and users_ids cannot be used thogether
message_en optional

Default value: (empty string)

Message in english language that will be displayed to a user
event_type_id optional

Default value: custom

Event type of notification to send
send_after optional

Default value: (empty string)

Datetime string - if used, notification will be delayed to selected time
data optional

Default value: (empty string)

JSON object with data that will be send in notification
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:

Empty dict on success

services/events2/statement

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/statement

Get statement

id required ID of a statement
fields optional

Default value: id|primary_group|title|content|is_calendar|location|start|end|send_after|sent_at|is_personal|statement_type

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 optional 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 selected fields and their values.

Available fields:

  • id - ID of a statement;

  • primary_group - Group of users that statement is addressed to.

    This field references objects returned by services/prgroups/primary_group method. See its returns section for possible subfields (only primary are allowed).

  • title - Langdict object;

  • content - Langdict object;

  • is_calendar - True if statement should be displayed in calendar;

  • location - Dict of following values: city, address, geo_lat, geo_long;

  • start - Datetime with start;

  • end - Datetime with end;

  • send_after - Date of publication;

  • sent_at - Date of publication;

  • is_personal - true if statement is personalized statement;

  • statement_type - one of following values: news, statement;

  • recipients - List of recipients.

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

services/events2/update_event_channel

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/update_event_channel

Update event channel for selected event type

body required Object is accepted as POST body
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 optional 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:

Empty dict on success

services/events2/update_event_schedule

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/update_event_schedule

update event type schedule

body required Object is accepted as POST body
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 optional 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:

Empty dict on success

services/events2/update_event_type

Consumer: required Token: required Scopes: none SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/update_event_type

Get information about event type

body required Object is accepted as POST body
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 required oauth_token for Token authorization.

Returned value:

Empty dict on success

services/events2/update_statement

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/update_statement

Update or insert statement

body required Object is accepted as POST body
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 optional 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:

Empty dict on success

services/events2/update_user_preference

Consumer: optional Token: optional Scopes: n/a SSL: not required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/update_user_preference

Update user preference object

body required Object is accepted as POST body
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 optional 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:

Empty dict on success

services/events2/user_preferences

Consumer: required Token: required Scopes: events SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/user_preferences

Get user preferences

fields optional

Default value: id|schedule|is_enabled

Selector of result fields you are interested in. The selector must contain subset of primary fields, which are described in the returns section of event_preference 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. Plus required oauth_token for Token authorization.

Returned value:

all user preferences

services/events2/validate_one_time_code

Consumer: required Token: required Scopes: none SSL: required
https://www.usosapi.amuz.bydgoszcz.pl/services/events2/validate_one_time_code

Generate and send one time code to user

id required ID of a code
code required code to be validated
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 required oauth_token for Token authorization.

Returned value:

empty dict on success
USOS API ver. 7.1.0.0-4, 0e1fe7fc (2024-08-27)