ASSETS

Assets represent additional content related to a given Event. These are typically .gifs .jpgs and .mp4s but also other system based files such as .ism (if you are using USP) for example.

As Assets are related to an Event they provide accessible URLs to the file by using the configured Vuflow on the Event. You will need to make sure storageUrlPublic is set on the configuration JSON.


Asset State

Assets can be requested, so are therefore tracked by the system. Each Asset has a state, defined below:

  • 0 = GENERATING
  • 1 = COMPLETED
  • 2 = FAILED

Asset Type

Assets are also ‘typed’ to identify purpose within the system. In general, Assets with a SYSTEM type were generated by a process within the system, whereas other types are user generated (see below).

  • 0 = SYSTEM
  • 1 = IMAGE
  • 2 = VIDEO
  • 3 = GIF

Asset Object

{
  "id": "be336dfa-2b79-41e0-b9ad-3256bba60722",
  "eventId": "c543b222-86fd-4905-b570-33f2fc6e8a82",
  "name": "Example Asset",
  "path": "path-to-content/filename.extension",
  "extension": "extension",
  "state": 1,
  "stateString": "COMPLETED",
  "type": 0,
  "typeString": "SYSTEM",
  "jobId": "9001",
  "contentId": "content-id-here",
  "dateCreated": "2020-03-18T17:42:28Z",
  "dateModified": "2020-03-18T17:42:28Z",
  "url": "http://configured-vuflow-url.com/path-to-content/filename.extension"
}

Supported Actions

POST /asset/gif/

Request a new GIF Asset for the Event.

Request Body:

{
    "clip": {
        "eventId": "c8e46941-b513-49dc-a9a6-868a9998a062",
        "start": "00:00:46",
        "end": "00:00:52"
    },
    "name": "Example GIF",
    "fps": 18,
    "height": null,
    "width": null,
    "playbackRepeats": 0,
    "reverse": false,
    "playbackSpeed": 1.0
}

Property Documentation:

Name Type Required Description
clip.eventId string Yes The Event Id
clip.start string Yes HH:mm:ss.fff from the beginning of the stream
clip.end string Yes HH:mm:ss.fff from the beginning of the stream
name string Yes The name of the Asset
fps int No The FPS of the GIF
height float No The height of the GIF
width float No The width of the GIF
playbackSpeed float No Alters the playback speed where 0.0 is a still frame and 1.0 is a normal speed
playbackRepeats int No Alters the number of times the GIF will repeat where -1 is disabled, 0 is infinite, and n is N repetitions
filename string No The filename to set. Defaults to using the Asset name if not provided
priority int No The priority to process this request at. Defaults to 5, can be set from 1 (highest) to 10 (lowest)

Response: 200 OK and JSON containing the new Asset object.


POST /asset/video/

Request a new VIDEO Asset for the Event.

Request Body:

{
    "clip": {
        "eventId": "c8e46941-b513-49dc-a9a6-868a9998a062",
        "start": "00:00:46",
        "end": "00:00:52"
    },
    "name": "Example Video",
    "mezzanine": false,
    "frameAccurate": false,
    "copyTs": false,
    "priority": null,
    "filename": null
}

Property Documentation:

Name Type Required Description
clip.eventId string Yes The Event Id
clip.start string Yes ISO8601 if the stream contains timecode information, otherwise HH:mm:ss.fff
clip.end string Yes ISO8601 if the stream contains timecode information, otherwise HH:mm:ss.fff
name string Yes The name of the Asset
mezzanine float No Specifies whether to include all tracks (false) or only the highest (true)
frameAccurate int No Specified whether the capturing should be frame accurate or not
copyTs bool No Specifies whether to copy the timestamps into the file or not
filename string No The filename to set. Defaults to using the Asset name if not provided
priority int No The priority to process this request at. Defaults to 5, can be set from 1 (highest) to 10 (lowest)

POST /asset/image/

Request a new IMAGE Asset for the Event.

Request Body:

{
  "eventId": "c8e46941-b513-49dc-a9a6-868a9998a062",
  "name": "JPEG from 5 seconds in",
  "time": "00:00:05",
  "priority": null,
  "filename": null
}

Property Documentation:

Name Type Required Description
eventId string Yes The Event Id
name string Yes The name of the Asset
time string Yes ISO8601 if the stream contains timecode information, otherwise HH:mm:ss.fff
filename string No The filename to set. Defaults to using the Asset name if not provided.
priority int No The priority to process this request at. Defaults to 5, can be set from 1 (highest) to 10 (lowest)

Response: 200 OK and JSON containing the new Asset object.


PUT /asset/{id}/

Rename an Asset by Id.

Query Parameters:

Name: {string} - Required. The new name for the Asset.

Response: 200 OK and JSON containing the new Asset object.


GET /asset/

Get many Assets.

Query Parameters:

Name Type Required Description
eventId guid No The Event Id to filter to.
contentId string No The Content Id to filter to.
jobId string No The Job Id to filter to.
name string No The Name to filter to.
states string No A comma-separated list of AssetStates to filter to.
types string No A comma-separated list of AssetTypes to filter to.
noCache bool No Whether or not to bypass cache. Defaults to False.

Response: 200 OK and a JSON array containing multiple Asset objects.


GET /asset/{id}/

Get an Asset by Id.

Query Parameters:

Name Type Required Description
noCache bool No Whether or not to bypass cache. Defaults to False.

Response: 200 OK and JSON containing the Asset object.


DEL /asset/

Delete many Assets. SYSTEM Assets are not deleted. You must provide at least 1 optional parameter.

Query Parameters:

Name Type Required Description
eventId guid No The Event Id to filter to.
contentId string No The Content Id to filter to.
jobId string No The Job Id to filter to.
name string No The Name to filter to.
states string No A comma-separated list of AssetStates to filter to.
types string No A comma-separated list of AssetTypes to filter to.

Response: 200 OK


DEL /asset/{id}

Delete an Asset by Id. SYSTEM Assets are not deletable.

Response: 200 OK