The /sapi/mediaasset endpoint is used for managing file/stream references, also referred to as “assets”.
1.0 | Object structure
{ id: "1635250054904314", status: "active", type: "MediaAsset", width: "1280", height: "720", bandwidth: "2000", mimetype: "video/mp4; codecs=\"avc1.4d481f, mp4a.40.2\"", exactlength: "72981", jobqid: "7510", src: "/yourcompanyname/media/2021/07/01/asset-4440750-1635250054904314.mp4", filename: "asset-4440750-1635250054904314.mp4", length: "72", mediatype: "MP4_MAIN", mediaclipid: "4440750" }
The above structure is a JSON representation of an mp4 video asset containing its properties, such as its:
- Status (“active” or “inactive”)
- Location path (“src”)
- Bandwidth (kbps)
- Length (in seconds)
- Exact length (in milliseconds)
- Associated media clip (‘mediaclipid’)
The status property is ‘active’ by default and can be set to inactive. When set to ‘inactive’, the asset is left out of the public media clip data that is used in a player embed situation. The ‘mediaclipid’ property refers to the associated media clip. Each asset can only be associated to one media clip.
Read more about assets.
2.0 | Create/Update
PUT /sapi/mediaasset
When creating or updating a media asset, the payload should contain a JSON encoded media asset object:
{"status":"active","mediaclipid":"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)"}
A “mediaclipid” property is required and should contain the ID of a valid media clip for proper association to an existing media clip.
3.0 | Retrieve
GET /sapi/mediaasset/[ASSET-ID]
Example: https://yourcompanyname.bbvms.com/sapi/mediaasset/12345678901234567/
The /sapi/mediaasset endpoint does not have a list or query view. Including an asset id is required for returning a valid response.
4.0 | Delete
DELETE /sapi/mediaasset/[ASSET-ID]
Example: https://yourcompanyname.bbvms.com/sapi/mediaasset/12345678901234567/
Use to permanently delete a media asset reference. Only the referring metadata link to the file or live stream is removed.