/sapi/mediaasset


The /sapi/mediaasset endpoint is used for managing file/stream references. In the Online Video Platform, we call them “assets”.

1.0 | Object structure

{
id: "1533119035263115",
status: "active",
type: "MediaAsset",
width: "512",
height: "512",
bandwidth: "400",
exactlength: "14840",
jobqid: "10",
src: "/media/2018/08/01/asset-1082435-1533119035263115.mp4",
filename: "asset-1082435-1533119035263115.mp4",
length: "14",
mediatype: "MP4_IPOD",
mediaclipid: "1082435"
}

The above structure is a JSON representation of an mp4 video file reference. It contains information about the location of the file (src), its length (in seconds) and exactlength (in milliseconds), and its mediatype.

The status property is active by default and can be set to inactive. If inactive, the mediaasset is left out of the public Media Clip data that is used in a Player embed situation. Mediaclipid refers to the Media Clip the Media-asset is attached to. Each Media-asset can be related to 1 Mediaclip only.

Mediatype:

MP4_HLS Adaptive HLS file/stream

MP4_MAIN mp4 (AVC) file

MP4_HD (AVC HD) file

MP4_IPOD (AVC low complexity) file

For more information about assets, click here!

2.0 | Create/Update

PUT /sapi/mediaasset

The payload should contain a JSON encoded mediaasset object:

{"status":"active","media-clipid":"1082436","src":"[https://nice.asset.website","mediatype":"MP4_HLS","bandwidth":"121","width":"121","height":"212](https://nice.asset.website","mediatype":"MP4_HLS","bandwidth":"121","width":"121","height":"212)"}

Media-clipid is required and should be the ID of a valid Media Clip this file/stream should refer to.

3.0 | Retrieve

GET /sapi/mediaasset/ID

The /sapi/mediaasset endpoint does not have a “list” or “query” view. It can only be used to retrieve a Media-asset by id.

4.0 | Delete

DELETE /sapi/mediaasset/ID

Will cause a Media-asset reference to be permanently deleted. Only the referring metadata linking to the file or live stream is removed.

Updated on August 25, 2020

Was this article helpful?

Related Articles