SignalR
The Notification component of Portos API uses SignalR to provide real-time updates to client applications.
System-defined events
Event
Event name
Description
Receiving Events from Portos API
Client authentication
const token = "YOUR_BEARER_TOKEN"; // Replace with your actual token
const serverAddress = "SERVER_ADDRESS"; // Replace with your actual server addess, e.g. http://localhost:3000
const connection = new signalR.HubConnectionBuilder()
.withUrl(serverAddress + "/signalr/v1/mainHub", {
accessTokenFactory: () => token
})
.build();Register Event Handler
Notification
Property name
Type
Description
NotificationSender
Property name
Type
Description
NotificationSenderUserIdentity
Property name
Type
Description
ResourceChangedNotificationPayload
Property name
Type
Description
UserIdentity
Property name
Type
Description
ResourceInfo
Property name
Type
Description
Start the connection
Subscribe to Events
Subscribe to Resource Changed Event
Property name
Type
Description
SubscriptionRequestResource
Property name
Type
Description
Subscribe to License activated event
Unsubscribe from Events
Last updated