Skip to content
On this page

Resource API

EndpointMethodDescription
/api/v0/resource/createwebRequestCreate resource metadata
/api/v0/resource/{id}webRequestRead resource
/api/v0/resource/network/{networkId}/{id}webRequestRead resource (from certain network)
/api/v0/resource/proxy/{id}webRequestProxy resource
/api/v0/resource/proxy/youtubewebRequestProxy resource
/api/v0/resource/thumbnail/{size}/{id}webRequestRead resource thumbnail
/api/v0/resource/url/{id}webRequestGet direct resource url
/api/v0/resource/network/{networkId}/url/{id}webRequestGet direct resource url (from certain network)
/api/v0/resource/thumbnail/url/{size}/{id}webRequestGet direct thumbnail url
/api/v0/resource/thumbnail/user/{id}webRequestRead user thumbnail
/api/v0/resource/thumbnail/user/size/{size}/{id}webRequestRead user thumbnail (with size)
/api/v0/resource/thumbnail/user/url/{id}webRequestGet user thumbnail url
/api/v0/resource/thumbnail/user/url/size/{size}/{id}webRequestGet user thumbnail url (with size)
/api/v0/resource/thumbnail/room/{id}webRequestRead room thumbnail
/api/v0/resource/thumbnail/room/size/{size}/{id}webRequestRead room thumbnail (with size)
/api/v0/resource/thumbnail/room/url/{id}webRequestGet room thumbnail url
/api/v0/resource/thumbnail/room/url/size/{size}/{id}webRequestGet room thumbnail url (with size)
/api/v0/resource/thumbnail/network/{id}webRequestRead network thumbnail
/api/v0/resource/thumbnail/network/size/{size}/{id}webRequestRead network thumbnail (with size)
/api/v0/resource/thumbnail/network/url/{id}webRequestGet network thumbnail url
/api/v0/resource/thumbnail/network/url/size/{size}/{id}webRequestGet network thumbnail url (with size)
/api/v0/resource/thumbnail/amazon/{id}webRequestRead Amazon thumbnail
/api/v0/resource/thumbnail/youtube/{id}webRequestRead Youtube thumbnail
/api/v0/resource/thumbnail/imdb/{id}webRequestRead Imdb thumbnail
/api/v0/resource/thumbnail/pinterest/{id}webRequestRead Pinterest thumbnail
/api/v0/resource/thumbnail/linkwebRequestRead link thumbnail
/api/v0/rpc/resource.infojsonRpcInfo
imdb:searchwebsocketSearch imdb
imdb:infowebsocketInfo imdb
resource:createImdbMultiwebsocketCreate imdb resources
link:infowebsocketInfo link
pinterest:searchwebsocketSearch pinterest
pinterest:infowebsocketInfo pinterest
resource:createPinterestwebsocketCreate pinterest resource
pixabay:searchwebsocketSearch pixabay
sortingTable:getwebsocketGet user sorting table content
sortingTable:deleteAllResourceswebsocketDelete all resources from user sorting table
sortingTable:deleteResourceswebsocketDelete resources from user sorting table
sortingTable:restoreResourceswebsocketRestore resources to user sorting table
room:deleteAllResourcesFromSortingTablewebsocketDelete all resources from room sorting table
room:deleteResourcesFromSortingTablewebsocketDelete resources from room sorting table
room:restoreResourcesToSortingTablewebsocketRestore resources to room sorting table
resource:subscribewebsocketSubscribe to resource channel
resource:unsubscribewebsocketUnsubscribe from resource channel
resource:createwebsocketCreate resource
resource:createRemoteUrlResourcewebsocketCreate remote url resource
resource:remoteImageUploadwebsocketCreate remote image resource
resource:generateAIImagewebsocketGenerate aI image
resource:createLinkResourcewebsocketCreate link resource
resource:createGoogleDriveResourcewebsocketCreate google drive resource
resource:syncGoogleDriveDirectorywebsocketSync google drive directory
resource:deletewebsocketDelete resource
resource:movewebsocketMove resource
resource:updateAttributeswebsocketUpdate resource attributes
resource:getUrlwebsocketGet url
resource:getResourceUrlwebsocketGet resource url
resource:getThumbnailUrlwebsocketGet thumbnail url
resource:getwebsocketGet resource
resource:getResourceFromNetworkwebsocketGet resource from network
resource:listBelongingwebsocketList belonging resources
resource:searchBelongingwebsocketSearch belonging resources
resource:unsubscribeFromBelongingwebsocketUnsubscribe from belonging
resource:getPublicMusicwebsocketGet public music
resource:createDirectorywebsocketCreate directory
resource:listParentDirectorieswebsocketList parent directories
resource:getStreamSourceswebsocketGet stream sources
sortingTable:addResourceswebsocketEventOn resources added to user sorting table event
sortingTable:deleteResourceswebsocketEventOn resources deleted from user sorting table event
sortingTable:addResourcesToDirectorywebsocketEventOn resources added to directory in user sorting table event
sortingTable:deleteResourcesFromDirectorywebsocketEventOn resources deleted from directory in user sorting table event
resource:addedToUploadSessionwebsocketEventOn resources added to upload session event
resource:deletedFromUploadSessionwebsocketEventOn resources deleted from upload session event
sortingTable:resourceUpdatedwebsocketEventOn user sorting table resource updated event
resource:addedToBelongingwebsocketEventOn resources added to belonging event
resource:deletedFromBelongingwebsocketEventOn resources deleted from belonging event
resource:updatedwebsocketEventOn resource updated event
resource:updatedInUploadSessionwebsocketEventOn upload session resource updated event
resource:updatedInChannelwebsocketEventOn channel resource updated event
resource:syncGoogleDriveDirectoryResultwebsocketEventOn sync google drive directory result event

Create resource metadata

HTTP Method: POST

Path: /api/v0/resource/create

Request:

{
    "resource": { resource structure }
    "parent": string  // mark that resource belongs to directory
    "roomId": string  // mark that resource belongs to room
    "contributeToRoom": string  // mark that resource belongs to room sorting table
    "addToSortingTable": bool  // mark that resource belongs to user sorting table
    "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
}

Response:

{
    "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
}

Read resource

HTTP Method: GET

Path: /api/v0/resource/

Description: Endpoint redirects to direct resource location.

Url parameter "response-content-disposition" sets Content-Disposition header in Google bucket response (https://cloud.google.com/storage/docs/xml-api/reference-headers#responsecontentdisposition).

Parameters:

response-content-disposition: string

Request:

{ empty }

Response:

Resource data

Read resource (from certain network)

HTTP Method: GET

Path: /api/v0/resource/network/{networkId}/

Description: Endpoint redirects to direct resource location.

Url parameter "response-content-disposition" sets Content-Disposition header in Google bucket response (https://cloud.google.com/storage/docs/xml-api/reference-headers#responsecontentdisposition).

Parameters:

response-content-disposition: string

Request:

{ empty }

Response:

Resource data

Proxy resource

HTTP Method: GET

Path: /api/v0/resource/proxy/

Description: Endpoint serves resource without redirection.

Request:

{ empty }

Response:

Resource data

Proxy resource

HTTP Method: GET

Path: /api/v0/resource/proxy/youtube

Parameters:

url: Youtube video url (must end with "googlevideo.com")

Request:

{ empty }

Response:

Youtube resource data

Read resource thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/{size}/

Description: Parameter {size} could be skipped (/api/v0/resource/thumbnail/{id}) in this endpoint. In case if size is not provided, default thumbnail (512) is returned.

Request:

{ empty }

Response:

Resource thumbnail data

Get direct resource url

HTTP Method: GET

Path: /api/v0/resource/url/

Description: Endpoint returns Google bucket url for resources that are stored by Valuverse.

Request:

{ empty }

Response:

Direct url to resource

Get direct resource url (from certain network)

HTTP Method: GET

Path: /api/v0/resource/network/{networkId}/url/

Description: Endpoint returns Google bucket url for resources that are stored by Valuverse.

Request:

{ empty }

Response:

Direct url to resource

Get direct thumbnail url

HTTP Method: GET

Path: /api/v0/resource/thumbnail/url/{size}/

Description: Endpoint returns Google bucket url for resource thumbnail. The {size} parameter is optional.

Request:

{ empty }

Response:

Direct url to resource

Read user thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/user/

Request:

{ empty }

Response:

User thumbnail data

Read user thumbnail (with size)

HTTP Method: GET

Path: /api/v0/resource/thumbnail/user/size/{size}/

Request:

{ empty }

Response:

User thumbnail data

Get user thumbnail url

HTTP Method: GET

Path: /api/v0/resource/thumbnail/user/url/

Request:

{ empty }

Response:

Direct url to user avatar resource

Get user thumbnail url (with size)

HTTP Method: GET

Path: /api/v0/resource/thumbnail/user/url/size/{size}/

Request:

{ empty }

Response:

Direct url to user avatar resource

Read room thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/room/

Request:

{ empty }

Response:

Room thumbnail data

Read room thumbnail (with size)

HTTP Method: GET

Path: /api/v0/resource/thumbnail/room/size/{size}/

Request:

{ empty }

Response:

Room thumbnail data

Get room thumbnail url

HTTP Method: GET

Path: /api/v0/resource/thumbnail/room/url/

Request:

{ empty }

Response:

Direct url to room avatar resource

Get room thumbnail url (with size)

HTTP Method: GET

Path: /api/v0/resource/thumbnail/room/url/size/{size}/

Request:

{ empty }

Response:

Direct url to room avatar resource

Read network thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/network/

Request:

{ empty }

Response:

Network thumbnail data

Read network thumbnail (with size)

HTTP Method: GET

Path: /api/v0/resource/thumbnail/network/size/{size}/

Request:

{ empty }

Response:

Network thumbnail data

Get network thumbnail url

HTTP Method: GET

Path: /api/v0/resource/thumbnail/network/url/

Request:

{ empty }

Response:

Direct url to network thumbnail resource

Get network thumbnail url (with size)

HTTP Method: GET

Path: /api/v0/resource/thumbnail/network/url/size/{size}/

Request:

{ empty }

Response:

Direct url to network thumbnail resource

Read Amazon thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/amazon/

Request:

{ empty }

Response:

Amazon thumbnail data

Read Youtube thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/youtube/

Request:

{ empty }

Response:

Youtube thumbnail data

Read Imdb thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/imdb/

Request:

{ empty }

Response:

Imdb thumbnail data

Read Pinterest thumbnail

HTTP Method: GET

Path: /api/v0/resource/thumbnail/pinterest/

Request:

{ empty }

Response:

Pinterest thumbnail data

HTTP Method: GET

Path: /api/v0/resource/thumbnail/link

Parameters:

url: link url

Request:

{ empty }

Response:

Link thumbnail data

Info

Method: jsonRpc

HTTP Method: POST

Path: /api/v0/rpc/resource.info

DEPRECATED

Headers:

X-Session-Id: sessionToken

Request:

{
    "resourceId": string
}

Response:

{
    "data": {
        "resource": {
            "id": string
            "created": timestamp
            "updated": timestamp
            "title": string
            "description": string
            "location": string
            "date": string
            "category": string
            "status": string
            "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
            "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 }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search imdb

Method: websocket

Endpoint: imdb:search

Request:

{
    "data": {
        "s": string
        "y": string
        "type": string
        "plot": string
        "page": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "Search": [{
            "Title": string
            "Year": string
            "imdbID": string
            "Type": string
            "Poster": string
            "Plot": string
        }]
        "totalResults": string
        "Response": string
        "Error": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Info imdb

Method: websocket

Endpoint: imdb:info

Request:

{
    "data": {
        "i": string
        "t": string
        "y": string
        "type": string
        "plot": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "Actors": string
        "Awards": string
        "BoxOffice": string
        "Country": string
        "DVD": string
        "Director": string
        "Genre": string
        "Language": string
        "Metascore": string
        "Plot": string
        "Poster": string
        "Production": string
        "Rated": string
        "Ratings": [{
            "Source": string
            "Value": string
        }]
        "Released": string
        "Runtime": string
        "Title": string
        "Trailers": [ string ]
        "Type": string
        "Website": string
        "Writer": string
        "Year": string
        "imdbID": string
        "imdbRating": string
        "imdbVotes": string
        "Response": string
        "Error": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create imdb resources

Method: websocket

Endpoint: resource:createImdbMulti

Request:

{
    "data": {
        "id": [ string ]
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: link:info

Description: API returns web page information of url provided in request.

Request:

{
    "data": {
        "url": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "url": string
        "title": string
        "description": string
        "isImage": bool
        "thumbnail": string
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search pinterest

Method: websocket

Endpoint: pinterest:search

Request:

{
    "data": {
        "keywords": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "results": [{
            "id": string
            "type": string
            "title": string
            "link": string
            "description": string
            "images": {
                "736x": {
                    "url": string
                    "width": int
                    "height": int
                }
                "474x": {
                    "url": string
                    "width": int
                    "height": int
                }
                "236x": {
                    "url": string
                    "width": int
                    "height": int
                }
                "orig": {
                    "url": string
                    "width": int
                    "height": int
                }
            }
            "rich_summary": {
                "display_name": string
            }
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Info pinterest

Method: websocket

Endpoint: pinterest:info

Request:

{
    "data": {
        "id": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "result": {
            "id": string
            "type": string
            "title": string
            "link": string
            "description": string
            "images": {
                "736x": {
                    "url": string
                    "width": int
                    "height": int
                }
                "474x": {
                    "url": string
                    "width": int
                    "height": int
                }
                "236x": {
                    "url": string
                    "width": int
                    "height": int
                }
                "orig": {
                    "url": string
                    "width": int
                    "height": int
                }
            }
            "rich_summary": {
                "display_name": string
            }
        }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create pinterest resource

Method: websocket

Endpoint: resource:createPinterest

Request:

{
    "data": {
        "pin": string
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search pixabay

Method: websocket

Endpoint: pixabay:search

Request:

{
    "data": {
        "q": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "total": int
        "totalHits": int
        "hits": [{
            "id": int
            "pageURL": string
            "type": string
            "tags": string
            "previewURL": string
            "previewWidth": int
            "previewHeight": int
            "webformatURL": string
            "webformatWidth": int
            "webformatHeight": int
            "largeImageURL": string
            "fullHDURL": string
            "imageURL": string
            "imageWidth": int
            "imageHeight": int
            "imageSize": int
            "views": int
            "downloads": int
            "favorites": int
            "likes": int
            "comments": int
            "user_id": int
            "user": string
            "userImageURL": string
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get user sorting table content

Method: websocket

Endpoint: sortingTable:get

Description: API returns list of resources that user uploaded to system, but not yet assigned to prop.

Request:

{
    "data": {
        "offset": int
        "size": int
        "subscribe": bool
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "content": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete all resources from user sorting table

Method: websocket

Endpoint: sortingTable:deleteAllResources

Request:

{ empty }

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete resources from user sorting table

Method: websocket

Endpoint: sortingTable:deleteResources

Request:

{
    "data": {
        "resources": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Restore resources to user sorting table

Method: websocket

Endpoint: sortingTable:restoreResources

Request:

{
    "data": {
        "resources": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Delete all resources from room sorting table

Method: websocket

Endpoint: room:deleteAllResourcesFromSortingTable

Request:

{
    "data": {
        "roomId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete resources from room sorting table

Method: websocket

Endpoint: room:deleteResourcesFromSortingTable

Request:

{
    "data": {
        "room": string
        "resources": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "room": string
        "resources": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Restore resources to room sorting table

Method: websocket

Endpoint: room:restoreResourcesToSortingTable

Request:

{
    "data": {
        "room": string
        "resources": [ string ]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "room": string
        "resources": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Subscribe to resource channel

Method: websocket

Endpoint: resource:subscribe

Description: Subscribe to resource event channel

Request:

{
    "data": {
        "resource": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Unsubscribe from resource channel

Method: websocket

Endpoint: resource:unsubscribe

Description: Unsubscribe from resource event channel

Request:

{
    "data": {
        "resource": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Create resource

Method: websocket

Endpoint: resource:create

Description: API creates resource model.

For Facebook resources, use resource:remoteImageUpload instead.

Belonging determines resource location in the system in a way belongingType:belongingPath(networkId). Part with (networkId) is optional.

Available belonging field values:

  • userSortingTable:{userId} - add resource to user sorting table;
  • roomSortingTable:{roomId} - add resource to room sorting table;
  • userAIGeneration:{userId} - add resource to the list of AI generated resources by user;
  • uploadSession:{userId}/{uploadSessionId} - upload resource before assigning to final belonging;
  • directory:{parentResourceId} - add resource to a directory.

Request:

{
    "data": {
        "resource": { resource structure }
        "networkId": string
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create remote url resource

Method: websocket

Endpoint: resource:createRemoteUrlResource

Description: Endpoint creates resource from remote url.

Resource field metadata.link will keep original url.

Resource field metadata.contentType will be one of: roomful#url, remote#image, remote#audio or remote#video.

Request:

{
    "data": {
        "url": string
        "urlType": string  // Hls/Dash
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create remote image resource

Method: websocket

Endpoint: resource:remoteImageUpload

Request:

{
    "data": {
        "url": string
        "title": string
        "source": string
        "sourceId": string
        "sourceLink": string
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Generate aI image

Method: websocket

Endpoint: resource:generateAIImage

Description: API creates image resource that will be generated using AI.

Request:

{
    "data": {
        "generationModel": string  // the model used for image generation [dall-e-3]
        "prompt": string  // a text description of the desired image
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Method: websocket

Endpoint: resource:createLinkResource

Description: API creates resource that is a copy of an existing resource. No need to upload resource data again, as API will create a link.

Request:

{
    "data": {
        "resource": string
        "networkId": string
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create google drive resource

Method: websocket

Endpoint: resource:createGoogleDriveResource

Request:

{
    "data": {
        "fileId": string
        "parent": string  // mark that resource belongs to directory
        "roomId": string  // mark that resource belongs to room
        "contributeToRoom": string  // mark that resource belongs to room sorting table
        "addToSortingTable": bool  // mark that resource belongs to user sorting table
        "belonging": string  // use custom belonging (like 'userAIGeneration:{userId}')
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Sync google drive directory

Method: websocket

Endpoint: resource:syncGoogleDriveDirectory

Description: Recursively synchronizes the content in the provided google drive resource directory.

Request:

{
    "data": {
        "resourceId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Delete resource

Method: websocket

Endpoint: resource:delete

Description: API moves resource to trashcan belonging.

Request:

{
    "data": {
        "resourceId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Move resource

Method: websocket

Endpoint: resource:move

Description: API moves resource to a new belonging.

Request:

{
    "data": {
        "resourceId": string
        "networkId": string
        "belonging": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Update resource attributes

Method: websocket

Endpoint: resource:updateAttributes

Request:

{
    "data": {
        "resource": string
        "attributes": {
            "title": string
            "description": string
            "location": string
            "date": string
            "category": string
        }
        "params": map[string]{ custom structure }
        "actions": [{ programmatic action with children structure }]
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get url

Method: websocket

Endpoint: resource:getUrl

DEPRECATED

Request:

{
    "data": {
        "resource": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "url": string
        "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
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get resource url

Method: websocket

Endpoint: resource:getResourceUrl

Request:

{
    "data": {
        "resourceId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "url": string
        "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
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get thumbnail url

Method: websocket

Endpoint: resource:getThumbnailUrl

Request:

{
    "data": {
        "resourceId": string
        "thumbnailSize": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "url": string
        "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
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get resource

Method: websocket

Endpoint: resource:get

Description: API returns resource metadata. It doesn't return resource content (e.g. comments or reactions). If resource is not found in current network, API looks for it in default network.

Request:

{
    "data": {
        "resource": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get resource from network

Method: websocket

Endpoint: resource:getResourceFromNetwork

DEPRECATED

Description: API is deprecated as all resources are stored in a default network now. Use resource:get instead.

Request:

{
    "data": {
        "resourceId": string
        "networkId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

List belonging resources

Method: websocket

Endpoint: resource:listBelonging

DEPRECATED

Description: API is deprecated, use resource:searchBelonging instead.

Request:

{
    "data": {
        "belonging": string
        "offset": int
        "size": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Search belonging resources

Method: websocket

Endpoint: resource:searchBelonging

Description: API searches resources that belong to exact place.

API subscribes user socket to belonging broadcast channel (only directory and community for now).

Examples:

  • userAIGeneration:{userId} - resources added to list of AI generated resources by user;
  • userSortingTable:{userId} - user sorting table resource;
  • roomSortingTable:{roomId} - room sorting table resources;
  • room:{roomId} - resources in a room;
  • room:{roomId}/{propId} - resources in a room prop;
  • roomProps:{roomId} - all resources in all room props;
  • community:{communityId} - community resources;
  • directory:{parentResourceId} - directory resources.

Request:

{
    "data": {
        "belonging": string
        "query": string
        "cursor": string
        "limit": int
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [{ resource structure }]
        "nextCursor": string
        "hasMore": bool
    }
    "error": { "status": bool, "code": int, "message": string }
}

Unsubscribe from belonging

Method: websocket

Endpoint: resource:unsubscribeFromBelonging

Description: API unsubscribes user socket from belonging broadcast channel.

Request:

{
    "data": {
        "belonging": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "error": { "status": bool, "code": int, "message": string }
}

Get public music

Method: websocket

Endpoint: resource:getPublicMusic

Description: API returns publicly uploaded music from default network

Request:

{ empty }

Response:

{
    "data": {
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Create directory

Method: websocket

Endpoint: resource:createDirectory

Description: See resource:create for more info on available belongings.

Request:

{
    "data": {
        "title": string
        "belonging": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

List parent directories

Method: websocket

Endpoint: resource:listParentDirectories

Description: API returns parent directories for resource, from top to bottom.

Request:

{
    "data": {
        "resourceId": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Get stream sources

Method: websocket

Endpoint: resource:getStreamSources

Request:

{
    "data": {
        "url": string
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "streams": map[string]{  // map of streamQuality:streamInfo
            "type": string
            "url": string
        }
        "plugin": string  // https://streamlink.github.io/plugin_matrix.html
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources added to user sorting table event

Event: sortingTable:addResources

Data:

{
    "data": {
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources deleted from user sorting table event

Event: sortingTable:deleteResources

Data:

{
    "data": {
        "resources": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources added to directory in user sorting table event

Event: sortingTable:addResourcesToDirectory

Data:

{
    "data": {
        "directoryId": string
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources deleted from directory in user sorting table event

Event: sortingTable:deleteResourcesFromDirectory

Data:

{
    "data": {
        "directoryId": string
        "resourceIds": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources added to upload session event

Event: resource:addedToUploadSession

Data:

{
    "data": {
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources deleted from upload session event

Event: resource:deletedFromUploadSession

Data:

{
    "data": {
        "resources": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On user sorting table resource updated event

Event: sortingTable:resourceUpdated

Data:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources added to belonging event

Event: resource:addedToBelonging

Data:

{
    "data": {
        "belonging": string
        "resources": [{ resource structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resources deleted from belonging event

Event: resource:deletedFromBelonging

Data:

{
    "data": {
        "belonging": string
        "resourceIds": [ string ]
    }
    "error": { "status": bool, "code": int, "message": string }
}

On resource updated event

Event: resource:updated

Data:

{
    "data": {
        "belonging": string
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On upload session resource updated event

Event: resource:updatedInUploadSession

Data:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On channel resource updated event

Event: resource:updatedInChannel

Data:

{
    "data": {
        "resource": { resource structure }
    }
    "error": { "status": bool, "code": int, "message": string }
}

On sync google drive directory result event

Event: resource:syncGoogleDriveDirectoryResult

Data:

{
    "data": {
        "resourceId": string
        "isSuccess": bool
        "errorCode": int
        "errorString": string
    }
    "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 }
    }
}