You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-1Lines changed: 29 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -234,6 +234,10 @@ Sending messages and notifications to users which are connected over the websock
234
234
-**Websocket-Interface**
235
235
236
236
Connecting and authenticating users against the node server and still more to receive live messages on client browser from server part.
237
+
There exists 2 rooms/namespaces which users can subscribe to:
238
+
239
+
-**private** - For single user messages to all instances of one user (e.g. one user is logged in with 3 browsers)
240
+
-**public** - For single user messages to all instances of one user *AND* broadcasting messages to all connected clients
237
241
238
242
-**Helper pages**
239
243
@@ -243,10 +247,34 @@ Helper pages to get informations about services, status of server and a test cli
243
247
-**Server Status Page:** http://[host-ip-of-server]:8080/status
244
248
-**Websocket Test Client:** http://[host-ip-of-server]:8080/testclient
245
249
246
-
250
+
General settings of the node server like IP, port, authentication, SSL support and active websocket rooms can be configured with [../node/node-notify-server/prefs.json](https://github.com/Dani3lSun/apex-websocket-notify-bundle/blob/master/node/node-notify-server/prefs.json) file as mentioned above.
247
251
248
252
### REST-Service
249
253
254
+
The REST-Service is designed to send messages to connected websocket users. Base-URL scheme with looks like this:
255
+
256
+
```
257
+
Type: GET
258
+
http://[host-ip-of-server]:[port]/notifyuser
259
+
```
260
+
261
+
-**URL-Parameter**
262
+
- userid (required) - User-ID of connected user, **in APEX APP_USER is used**
- type (required) - Notification type - valid values: info,success,warn,error
265
+
- optparam (optional) - Optional Parameter string to send any kind of information tp the websocket client
266
+
267
+
-**HTTP Header-Variables**
268
+
- notify-title (required) - Title of notification
269
+
- notify-message (required) - Message content of notification
270
+
271
+
A demo call using curl could look like this:
272
+
273
+
```
274
+
curl -H "notify-title: Test Title Text" -H "notify-message: Test Message Text" "http://[host-ip-of-server]:[port]/notifyuser?userid=daniel&room=private&type=info&optparam=myoptionalinfo123"
0 commit comments