Skip to content

Models

This page describes the JSON structure for each of the components in the Erizos MediaHub Environment.

Assets

An Asset is an object in Erizos MediaHub that represents a document.

Parameter Value Description
_id Uuid The unique id of the asset
name String The name of the asset
type Asset Type The type of the asset
mediaType Media Type The media type of the asset
size Number The size of the asset in bytes
path String The path to the asset
parent String The parent asset of the asset
tags String Array The tags assigned to the asset
meta Object The metadata of the asset
log Log Action Array An list of actions done to the asset
expiry Date The date the asset expires if set
createdAt Date Date and time the asset was created
updatedAt Date Date and time the asset was last updated

Example Model

{
    "_id": "606b741a6c0c5a1108243535",
    "size": 1382820,
    "tags": [],
    "name": "sample.jpg",
    "type": "FILE",
    "mediaType": "IMAGE",
    "parent": "000000000000000000000000",
    "path": "/",
    "meta": {
        "content-type": "image/jpeg",
        "width": 1920,
        "height": 1080,
        "has-alpha": false
    },
    "log": [
        {
            "timestamp": "2021-01-01T12:00:00.000Z",
            "username": null,
            "action": "CREATED",
            "info": {}
        }
    ],
    "createdAt": "2021-01-01T12:00:00.000Z",
    "updatedAt": "2021-01-01T12:00:00.000Z",
    "expiry": "2021-01-01T12:00:00.000Z",
}

Primitive Types

Uuid

A unique system identifier, Uuid is a string made of 24 hexadecimal characters

ID

Either a uuid or the name of the object, when specifying a name, Studio will perform a case-insensitive lookup, first matching object will be used.

Date

All dates are in the format of YYYY-MM-DDTHH:MM:SS.sssZ

Enumerations

Asset Type

Value Description
FOLDER An asset that is a Folder
FILE And asset that is a file

Media Type

Value Description
AUDIO Audio Files
VIDEO Video Files
IMAGE Image Files
SEQUENCE Image Sequence Files

Log Actions

Value Description
CREATED When the asset was created
DELETED When the asset was deleted
RENAMED When the asset was renamed
UPDATED When the asset was updated
REPLACED When the asset was replaced
RESTORED When the asset was restored