Skip to content

Commit

Permalink
add sse info to readme
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj committed Jun 26, 2023
1 parent 9fd801d commit 4f6dfb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/userlog/README.md
Expand Up @@ -30,6 +30,10 @@ For the time being, the configuration which user related events are of interest

The `userlog` service provides an API to retrieve configured events. For now, this API is mostly following the [oc10 notification GET API](https://doc.owncloud.com/server/next/developer_manual/core/apis/ocs-notification-endpoint-v1.html#get-user-notifications).

## Subscribing

Additionaly to the oc10 API the `userlog` service also provides an `/sse` (Server-Sent Events) endpoint to be informed by the server when an event happens. See [here](https://medium.com/yemeksepeti-teknoloji/what-is-server-sent-events-sse-and-how-to-implement-it-904938bffd73) for example for simple introduction to server sent events. The `sse` endpoint will respect language changes of the user without needing to reconnect.

## Deleting

To delete events for an user, use a `DELETE` request to `ocs/v2.php/apps/notifications/api/v1/notifications` containing the IDs to delete.
Expand Down

0 comments on commit 4f6dfb6

Please sign in to comment.