Room: Prop Content API
| Endpoint | Method | Description |
|---|---|---|
| room:subscribeToProp | websocket | Subscribe to prop channel |
| room:unsubscribeFromProp | websocket | Unsubscribe from prop channel |
| room:changePropContent | websocket | Change prop content |
| room:removeContentOfProps | websocket | Remove content of props |
| room:swapContentOfProps | websocket | Swap content of props |
| room:changeResourcePosition | websocket | Change resource position |
| room:linkPropContent | websocket | Link prop content |
| room:unlinkPropContent | websocket | Unlink prop content |
| room:getPropContent | websocket | Get prop content |
| room:propContentUpdated | websocketEvent | On room prop content updated event |
Subscribe to prop channel
Method: websocket
Endpoint: room:subscribeToProp
Description: Subscribe to prop event channel
Request:
{
"data": {
"roomId": string
"propId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Unsubscribe from prop channel
Method: websocket
Endpoint: room:unsubscribeFromProp
Description: Unsubscribe from prop event channel
Request:
{
"data": {
"roomId": string
"propId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Change prop content
Method: websocket
Endpoint: room:changePropContent
Request:
{
"data": {
"roomId": string
"propId": string
"appendToListEnd": bool // append to the end of resource list (if true)
"moveToProp": [ string ] // list of resource ids
"removeFromProp": [ string ] // list of resource ids
"moveToRoomSortingTable": [ string ] // list of resource ids (only for undo operation)
"moveToSortingTable": [ string ] // list of resource ids
"thumbnail": string // resource id
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"roomId": string
"propId": string
}
"error": { "status": bool, "code": int, "message": string }
}
Remove content of props
Method: websocket
Endpoint: room:removeContentOfProps
Request:
{
"data": {
"roomId": string
"propIds": [ string ]
"moveToRoomSortingTable": bool
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Swap content of props
Method: websocket
Endpoint: room:swapContentOfProps
Request:
{
"data": {
"roomId": string
"prop1Id": string
"prop2Id": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Change resource position
Method: websocket
Endpoint: room:changeResourcePosition
Request:
{
"data": {
"prop": string
"resource": string
"position": int
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Link prop content
Method: websocket
Endpoint: room:linkPropContent
Description: Api creates link between two props. If link created, prop will receive content from source prop.
- Api returns error code
830if link prop points to itself. - Api returns error code
831if source prop has a link to another prop. - Api returns error code
832if other props use current prop as a link source.
Request:
{
"data": {
"roomId": string
"propId": string
"sourceRoomId": string
"sourcePropId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Unlink prop content
Method: websocket
Endpoint: room:unlinkPropContent
Description: Api deletes link between two props.
Request:
{
"data": {
"roomId": string
"propId": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"error": { "status": bool, "code": int, "message": string }
}
Get prop content
Method: websocket
Endpoint: room:getPropContent
Request:
{
"data": {
"roomId": string
"propId": string
"offset": int
"size": int
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"content": [{ resource structure }]
}
"error": { "status": bool, "code": int, "message": string }
}
On room prop content updated event
Event: room:propContentUpdated
Data:
{
"data": {
"roomId": string
"propId": string
"content": [{ resource structure }]
}
"error": { "status": bool, "code": int, "message": string }
}
Models
Resource
{
"id": string
"created": timestamp
"updated": timestamp
"title": string
"description": string
"location": string
"date": string
"category": string
"linkId": string // id of resource link is pointing to
"linkType": string // global/local
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
"belonging": string // determines resource location in the system in a way 'belongingType:belongingPath(networkId)'
"status": string // pending/processing/ready/failed
"metadata": {
"fileName": string
"fileSize": int
"fileDate": timestamp
"behaviourType": string
"contentType": string
"convertedFrom": string
"link": string
"origin": { resource origin structure }
"geolocation": { geolocation structure }
"dimensions": { dimensions structure }
}
"thumbnail": string
"fromTemplate": bool
"totalReactions": int // amount of users who reacted to the resource
"data": {
"audio": { resource data audio structure }
"video": { resource data video structure }
"amazon": { resource data amazon structure }
"imdb": { resource data imdb structure }
"youtube": { resource data youtube structure }
"pinterest": { resource data pinterest structure }
"pixabay": { resource data pixabay structure }
"facebook": { resource data facebook structure }
"remoteUrl": { resource data remote url structure }
"liveStream": { live stream data structure }
"aiGeneration": { ai generation data structure }
"thumbnailUrl": string
"downloadUrl": string
"directory": { resource data directory structure }
"channel": { channel data structure }
"googleDrive": { google drive structure }
}
"customParams": map[string]{ custom structure } // client defined parameters
"actions": [{ programmatic action with children structure }] // custom programmatic actions from users
}
Resource Origin
{
"type": string
"device": string
"deviceName": string
"path": string
}
Geolocation
{
"latitude": float
"longitude": float
}
Dimensions
{
"width": int
"height": int
"orientation": int
}
Resource Data Audio
{
"title": string
"artist": string
"album": string
"genre": string
"duration": int
"durationFloat": float
}
Resource Data Video
{
"duration": int
"durationFloat": float
"hasAlphaChannel": bool // true, if video generated from gif with transparent pixels
"alphaChannel": string // alpha channel video resource (if generated from gif)
}
Resource Data Amazon
{
"asin": string
"summary": string
"author": [ string ]
"manufacturer": string
"title": string
"publicationDate": string
"url": string
}
Resource Data Imdb
{
"Actors": string
"Genre": string
"Ratings": [{
"Source": string
"Value": string
}]
"Released": string
"Runtime": string
"Website": string
"Year": string
"Trailers": [ string ]
"imdbID": string
}
Resource Data Youtube
{
"videoId": string
"formatId": string
}
Resource Data Pinterest
{
"pin": string
"url": string
}
Resource Data Pixabay
{
"id": string
"pageUrl": string
}
Resource Data Facebook
{
"id": string
}
Resource Data Remote Url
{
"url": string
"urlType": string
"favicon": string
"title": string
}
Live Stream Data
{
"streamId": string
"assetId": string
"playbackUrl": string
"masterUrl": string
}
AI Generation Data
{
"generationModel": string // the model used for image generation [dall-e-3]
"prompt": string // a text description of the desired image
"revisedPrompt": string // the prompt that was used to generate the image, if there was any revision to the prompt
"url": string // the URL of the generated image
}
Resource Data Directory
{
"innerContentType": string
"innerContentCount": int
}
Channel Data
{
"communityId": string
"channelId": string
"subChannelId": string
"messageId": string
}
Google Drive
{
"fileId": string
"name": string
"mimeType": string
}
Programmatic Action with children
{
"localId": string // local action id, operated by client side only
"eventName": string
"actionName": string
"actionData": {
"usedPropId": string
"usedRoomId": string
"usedNetworkId": string
"usedStorylineId": string
"usedQuestionId": int
"usedQuestionnaireId": int
"usedSegmentId": string
"usedPlacementAreaId": string
"usedRoomPoint": string
"animationData": map[string]{ custom structure }
}
"childActions": [{ programmatic action structure }]
}
Programmatic Action
{
"localId": string // local action id, operated by client side only
"eventName": string
"actionName": string
"actionData": {
"usedPropId": string
"usedRoomId": string
"usedNetworkId": string
"usedStorylineId": string
"usedQuestionId": int
"usedQuestionnaireId": int
"usedSegmentId": string
"usedPlacementAreaId": string
"usedRoomPoint": string
"animationData": map[string]{ custom structure }
}
}