Skip to content
On this page

Asset: Variant API

EndpointMethodDescription
/api/v0/asset/createVariantwebRequestCreate asset variant
/api/v0/asset/updateVariantwebRequestUpdate asset variant
/api/v0/asset/listVariantswebRequestList asset variants
/api/v0/asset/deleteVariantwebRequestDelete asset variant
/api/v0/asset/createSkinwebRequestCreate asset skin
/api/v0/asset/updateSkinwebRequestUpdate asset skin
/api/v0/asset/listSkinswebRequestList asset skins
/api/v0/asset/deleteSkinwebRequestDelete asset skin
/api/v0/asset/skin/upload/linkwebRequestDirect asset skin upload to Google bucket (get upload link)
/api/v0/asset/skin/upload/link/completewebRequestDirect asset skin upload to Google bucket (complete upload link)
/api/v0/asset/{assetId}/skin/{skinId}/platform/{platform}webRequestGet asset skin resource data for platform
/api/v0/asset/{assetId}/skin/{skinId}/platform/{platform}/patch/{patchVersion}webRequestGet asset skin resource data for platform per patch version
/api/v0/asset/{assetId}/skin/url/{skinId}/platform/{platform}webRequestGet asset skin resource url for platform
/api/v0/asset/{assetId}/skin/url/{skinId}/platform/{platform}/patch/{patchVersion}webRequestGet asset skin resource url for platform per patch version
/api/v0/asset/upload/variant/thumbnail/linkwebRequestDirect asset variant thumbnail upload to Google bucket (get upload link)
/api/v0/asset/upload/variant/thumbnail/link/completewebRequestDirect asset variant thumbnail upload to Google bucket (complete upload link)
/api/v0/asset/upload/skin/thumbnail/linkwebRequestDirect asset skin thumbnail upload to Google bucket (get upload link)
/api/v0/asset/upload/skin/thumbnail/link/completewebRequestDirect asset skin thumbnail upload to Google bucket (complete upload link)
/api/v0/asset/skin/setOriginalwebRequestSet asset skin original resource
/api/v0/asset/skin/original/{assetId}/{skinId}webRequestGet asset skin original data
/api/v0/asset/skin/original/url/{assetId}/{skinId}webRequestGet asset skin original url
asset:listVariantswebsocketList asset variants (runtime)
asset:listSkinswebsocketList asset skins (runtime)
asset:listAssetVariantsAndSkinswebsocketList asset variants and skins (runtime)

Create asset variant

HTTP Method: POST

Path: /api/v0/asset/createVariant

Request:

{
    "assetId": string
    "variant": {
        "name": string
        "defaultColor": { rgba structure }
        "hasColorSupport": bool
        "gameobjects": [ string ]
        "sortOrder": int
        "isHidden": bool  // hides variant from client
    }
}

Response:

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "name": string
    "defaultColor": { rgba structure }
    "hasColorSupport": bool
    "gameobjects": [ string ]
    "sortOrder": int
    "isHidden": bool  // hides variant from client
    "thumbnail": { resource structure }
}

Update asset variant

HTTP Method: POST

Path: /api/v0/asset/updateVariant

Request:

{
    "assetId": string
    "variant": {
        "id": string
        "name": string
        "defaultColor": { rgba structure }
        "hasColorSupport": bool
        "gameobjects": [ string ]
        "sortOrder": int
        "isHidden": bool  // hides variant from client
    }
}

Response:

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "name": string
    "defaultColor": { rgba structure }
    "hasColorSupport": bool
    "gameobjects": [ string ]
    "sortOrder": int
    "isHidden": bool  // hides variant from client
    "thumbnail": { resource structure }
}

List asset variants

HTTP Method: POST

Path: /api/v0/asset/listVariants

Request:

{
    "assetId": string
}

Response:

[{
    "id": string
    "created": timestamp
    "updated": timestamp
    "name": string
    "defaultColor": { rgba structure }
    "hasColorSupport": bool
    "gameobjects": [ string ]
    "sortOrder": int
    "isHidden": bool  // hides variant from client
    "thumbnail": { resource structure }
}]

Delete asset variant

HTTP Method: POST

Path: /api/v0/asset/deleteVariant

Request:

{
    "assetId": string
    "variantId": string
}

Response:

{ empty }

Create asset skin

HTTP Method: POST

Path: /api/v0/asset/createSkin

Request:

{
    "assetId": string
    "skin": {
        "variantId": string
        "name": string
        "isDefault": bool  // is default among other variant skins
        "overrideColor": { rgba structure }  // override default color
        "colorOnly": bool  // doesn't have textures, only color'
        "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
        "sortOrder": int
        "isHidden": bool  // hides skin from client
    }
}

Response:

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "assetId": string
    "variantId": string
    "name": string
    "isDefault": bool  // is default among other variant skins
    "overrideColor": { rgba structure }  // override default color
    "colorOnly": bool  // doesn't have textures, only color'
    "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
    "sortOrder": int
    "isHidden": bool  // hides skin from client
    "thumbnail": { resource structure }
    "urls": map[string]string  // asset skin data urls per platform
    "defaultColor": { rgba structure }  // applied by parent variant model
}

Update asset skin

HTTP Method: POST

Path: /api/v0/asset/updateSkin

Request:

{
    "assetId": string
    "skin": {
        "id": string
        "variantId": string
        "name": string
        "isDefault": bool  // is default among other variant skins
        "overrideColor": { rgba structure }  // override default color
        "colorOnly": bool  // doesn't have textures, only color'
        "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
        "sortOrder": int
        "isHidden": bool  // hides skin from client
    }
}

Response:

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "assetId": string
    "variantId": string
    "name": string
    "isDefault": bool  // is default among other variant skins
    "overrideColor": { rgba structure }  // override default color
    "colorOnly": bool  // doesn't have textures, only color'
    "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
    "sortOrder": int
    "isHidden": bool  // hides skin from client
    "thumbnail": { resource structure }
    "urls": map[string]string  // asset skin data urls per platform
    "defaultColor": { rgba structure }  // applied by parent variant model
}

List asset skins

HTTP Method: POST

Path: /api/v0/asset/listSkins

Request:

{
    "assetId": string
    "variantId": string
}

Response:

[{
    "id": string
    "created": timestamp
    "updated": timestamp
    "assetId": string
    "variantId": string
    "name": string
    "isDefault": bool  // is default among other variant skins
    "overrideColor": { rgba structure }  // override default color
    "colorOnly": bool  // doesn't have textures, only color'
    "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
    "sortOrder": int
    "isHidden": bool  // hides skin from client
    "thumbnail": { resource structure }
    "urls": map[string]string  // asset skin data urls per platform
    "defaultColor": { rgba structure }  // applied by parent variant model
}]

Delete asset skin

HTTP Method: POST

Path: /api/v0/asset/deleteSkin

Request:

{
    "assetId": string
    "skinId": string
}

Response:

{ empty }

HTTP Method: POST

Path: /api/v0/asset/skin/upload/link

Description: Direct upload gives possibility to upload files directly from a client to a storage bucket. It consist of next steps:

  1. Client asks the server for upload link. The server initializes an upload session and returns a link which could be used for upload.

  2. Client uploads a file to Google bucket.

  3. Client sends upload complete acknowledgment to the server.

Request:

{
    "assetId": string
    "skinId": string
    "platform": string
    "fileName": string
    "contentType": string
}

Response:

Google bucket upload link

HTTP Method: POST

Path: /api/v0/asset/skin/upload/link/complete

Description: See direct upload to Google bucket.

Request:

{
    "assetId": string
    "skinId": string
    "platform": string
}

Response:

{ empty }

Get asset skin resource data for platform

HTTP Method: GET

Path: /api/v0/asset/{assetId}/skin/{skinId}/platform/

Request:

{ empty }

Response:

Resource data

Get asset skin resource data for platform per patch version

HTTP Method: GET

Path: /api/v0/asset/{assetId}/skin/{skinId}/platform/{platform}/patch/

Request:

{ empty }

Response:

Resource data

Get asset skin resource url for platform

HTTP Method: GET

Path: /api/v0/asset/{assetId}/skin/url/{skinId}/platform/

Request:

{ empty }

Response:

Resource data

Get asset skin resource url for platform per patch version

HTTP Method: GET

Path: /api/v0/asset/{assetId}/skin/url/{skinId}/platform/{platform}/patch/

Request:

{ empty }

Response:

Resource data

HTTP Method: POST

Path: /api/v0/asset/upload/variant/thumbnail/link

Request:

{
    "assetId": string
    "variantId": string
    "fileName": string
    "contentType": string
}

Response:

Google bucket upload link

HTTP Method: POST

Path: /api/v0/asset/upload/variant/thumbnail/link/complete

Request:

{
    "assetId": string
    "variantId": string
}

Response:

{ empty }

HTTP Method: POST

Path: /api/v0/asset/upload/skin/thumbnail/link

Request:

{
    "assetId": string
    "skinId": string
    "fileName": string
    "contentType": string
}

Response:

Google bucket upload link

HTTP Method: POST

Path: /api/v0/asset/upload/skin/thumbnail/link/complete

Request:

{
    "assetId": string
    "skinId": string
}

Response:

{ empty }

Set asset skin original resource

HTTP Method: POST

Path: /api/v0/asset/skin/setOriginal

Description: API sets resource of original textures for asset skin.

Request:

{
    "assetId": string
    "skinId": string
    "resourceId": string
}

Response:

{ empty }

Get asset skin original data

HTTP Method: GET

Path: /api/v0/asset/skin/original/{assetId}/

Request:

{ empty }

Response:

{ empty }

Get asset skin original url

HTTP Method: GET

Path: /api/v0/asset/skin/original/url/{assetId}/

Request:

{ empty }

Response:

{ empty }

List asset variants (runtime)

Method: websocket

Endpoint: asset:listVariants

Request:

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

Response:

{
    "data": {
        "variants": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "name": string
            "defaultColor": { rgba structure }
            "hasColorSupport": bool
            "gameobjects": [ string ]
            "sortOrder": int
            "isHidden": bool  // hides variant from client
            "thumbnail": { resource structure }
        }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

List asset skins (runtime)

Method: websocket

Endpoint: asset:listSkins

Request:

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

Response:

{
    "data": {
        "skins": [{ asset bundle skin structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

List asset variants and skins (runtime)

Method: websocket

Endpoint: asset:listAssetVariantsAndSkins

Request:

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

Response:

{
    "data": {
        "variants": [{
            "id": string
            "created": timestamp
            "updated": timestamp
            "name": string
            "defaultColor": { rgba structure }
            "hasColorSupport": bool
            "gameobjects": [ string ]
            "sortOrder": int
            "isHidden": bool  // hides variant from client
            "thumbnail": { resource structure }
        }]
        "skins": [{ asset bundle skin structure }]
    }
    "error": { "status": bool, "code": int, "message": string }
}

Models


RGBA

{
    "r": float
    "g": float
    "b": float
    "a": float
}

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

Asset Bundle Skin

{
    "id": string
    "created": timestamp
    "updated": timestamp
    "assetId": string
    "variantId": string
    "name": string
    "isDefault": bool  // is default among other variant skins
    "overrideColor": { rgba structure }  // override default color
    "colorOnly": bool  // doesn't have textures, only color'
    "simplifiedSkin": bool  // applying the skins does not require prop hierarchy rebuild
    "sortOrder": int
    "isHidden": bool  // hides skin from client
    "thumbnail": { resource structure }
    "urls": map[string]string  // asset skin data urls per platform
    "defaultColor": { rgba structure }  // applied by parent variant model
}