Open suryayadavalli opened 3 years ago
@logicsandeep Sample web-socket connection html code is available in below location
@suryayadavalli In the diagram, I thought HSLynk was going to subscribe to alerts. Piton App would just display them when the callback comes in. Can we create a subscription endpoint Piton App can call to tell HSLynk what to subscribe to, for alerts?
@eric-jahn : Will come up with an subscription end point that PITON can call.
Client subscription API details URL: https://api.hslynk.com/hmis-event-service/rest/clients/e14b1753-7066-446f-badf-c89b0606ed0e/subscriptions
Request body
{
"type":"COVID"
}
We'll have to change this API to "event service" or something more generic, since it isn't really specific to HMIS. Any human services program dealing with COVID could use it.
@eric-jahn : name change to event-service is done. @logicsandeep and I had a meeting to go through the details of the real time notifications implementation.
Here is what's NOT included in the demo set up
Rest hook (to be registered with opencitylabs) : https://api.hslynk.com/hmis-event-service/eventnotifications Web socket URL that PITON need to listen to : realtime.hslynk.com/hmis-event-service/events-socket Specific channels (to be listened to from PITON) : To listen for all / any client's notifications : /clients To listen to notifications for a specific client using client ID : /clients/{clientid} To listen to notifications for a specific client using client's Dedup ID : /clients/{dedupclientid}
The body that is received from opencitylabs will be sent as is to the websocket (for demo purposes).
Test implementation of the complete flow https://realtime.hslynk.com/hmis-event-service/socket-test.html