'subscr' capability for WebSocket Token API
Overview
The module is used to subscribe to system events.
The following event categories are distinguished:
-
Data model change events - both static and dynamic (modelevents.data_changed).
-
Telephony events (callevents).
-
Telephony events for contact center needs (ccsevents).
-
IVR script events (ivrevents).
Notifications for project events generated in scripts are also possible.
Subscription is allowed for an integration_point channel of type subscr, and for channels of other types if subscribe or * is specified in opts.filter_capabilities.
To subscribe to modelevents.data_changed events, read permission for the class element or collection in the REST API is checked (the GET method):
-
if the channel is bound to a user (
opts.userid) - by the token roles (user roles and channel rolesopts.rolesaccording toopts.roles_mode); class security policies for this user also apply to the subscription; -
otherwise - by the channel’s own roles (
opts.roles); class security policies do not apply in this case.-
Contents is similar to WebSocket User API, but all event classes are available via Token API.
-
Overview of notification channels - in the article Notification channels from the system.
-