This section describes the payload of the WebSocket API exposed by the ContentServer.Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
base URL:ws://<server>:<port>/content/ws/v5
version:v5
ContentServer Websocket API
The websocket of the ContentServer provides the ability to listen for changes in a directory. The messages sent through the websocket follow the ones received by theIContentListener.
Every time a change is made, a message is sent through that connection.
The message from the ContentServer depends on the action performed: ADD, DELETE or UPDATE.
The following listing details the content sent through the payload:
Update an entry of the ContentServer
Action:Updated
When the you update an entry of the ContentServer, the ContentServer returns the newly updated entry’s content and metadata.
Example:
path: path to the entry.content: content of the entry.isDirectory: whether the entry is a directory or not.owners: list of users with edit access to the entry.readers: list of users with read access to the entry.timestamp: the UNIX timestamp of the last edit.lastEditor: the user who performed the update.canRead: whether the current user has read access to the entry.canWrite: whether the current user has write access to the entry.
Add an entry to the ContentServer
Action:Add
When you add a new entry to the ContentServer, the ContentServer returns the metadata of the created entry.
Example:
path: path to the entry.isDirectory: whether the entry is a directory.owners: list of users with edit access to the entry.readers: list of users with read access to the entry.timestamp: the UNIX timestamp of the last edit.lastEditor: the user who performed the update.canRead: whether the current user has read access to the entry.canWrite: whether the current user has write access to the entry.
Remove an entry of the ContentServer
When the user deletes an entry of the ContentServer, it only returns the path of the removed entry. Action:Remove
Miscellaneous
There are two further actions, one when the websocket is connected and the other when it disconnects. Each action only contains a single instruction. Action:Connected
Example: