Subscribe to an extra view
Motivation
As a client, I want to add a subscription to an existing channel
Functional Design
The client initiates PUT
/api/v2/apps/{owner}/{app}/notifications/{channelId}/workspaces/{wsid}/subscriptions/{entity}
The subscription is added to the channel in addition to existing subscriptions, the client starts receiving notifications about changes in the specified entity.
If the subscription already exists, it does nothing
Request headers
Content-Type
application/json
Authorization
Bearer {PrincipalToken}
Parameters
Path
owner
string
name of a user who owns the application
app
string
name of an application
wsid
int64
the ID of workspace
Headers
Authorization
If entity refers to a view, the client must have
read
permission for that view in the specified workspace.
Result
200
OK
Channel subscription added
Technical design
Components
~cmp.routerAddSubscriptionHandler~
✅ function to handle the request in router~err.routerAddSubscriptionInvalidToken~
✅ if the token is invalid or expired~err.routerAddSubscriptionNoPermissions~
❓ if the client has no permissions to read from the specified view
Integration tests
~it.AddSubscription~
✅
Last updated
Was this helpful?