Use the /sapi/mediaasset endpoint to manage file/stream references, also referred to as “assets”.
1.0 | Media Asset Object
1.1 | Example Media Asset Object
{
"id": "1695250034904311",
"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-4440752-1695250034904311.mp4",
"filename": "asset-4440752-1695250034904311.mp4",
"length": "72",
"mediatype": "MP4_MAIN",
"mediaclipid": "4440752"
}
1.2 | Attributes
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:
{
"id": "1718638091423804",
"status": "active",
"type": "MediaAsset",
"width": "1280",
"height": "720",
"bandwidth": "2000",
"mimetype": "video/mp4; codecs=\"avc1.4D4020\"",
"exactlength": "80013.267",
"filesize": "30179801",
"jobqid": "7483",
"src": "/yourcompanyname/media/2024/06/17/asset-5922444-1718638091423804.mp4",
"filename": "asset-5922444-1718638091423804.mp4",
"length": "80",
"mediatype": "MP4_MAIN",
"mediaclipid": "5922444"
}
3.0 | Retrieve
GET /sapi/mediaasset/{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/{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.