/sapi/mediaasset


Use the /sapi/mediaasset endpoint to manage file and 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

ParameterDescription
id(string) Unique identifier of the media asset. Read-only.
status(string) “active” (default) or “inactive”. When set to “inactive”, the asset is excluded from the public media clip data used in a player embed.
type(string) Fixed value: “MediaAsset”. Read-only.
width(string) Video width in pixels.
height(string) Video height in pixels.
bandwidth(string) Bitrate in kbps.
mimetype(string) MIME type of the file, including codec information where applicable.
exactlength(string) Exact duration in milliseconds.
filesize(string) File size in bytes.
jobqid(string) ID of the transcoding job that produced this asset. Read-only.
src(string) Location path of the file or stream. Read-only.
filename(string) Filename of the asset. Read-only.
length(string) Duration in seconds.
mediatype(string) Asset format identifier (e.g. “MP4_MAIN”). Read-only.
mediaclipid(string) ID of the associated media clip. Each asset can only be associated with one media clip. Required when creating an asset.

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"
}

A mediaclipid property is required to associate the asset with an existing media clip.

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. An asset id must be included to return a valid response.

4.0 | Delete

DELETE /sapi/mediaasset/{id}

Example: https://yourcompanyname.bbvms.com/sapi/mediaasset/12345678901234567/

Permanently deletes a media asset reference. Only the referring metadata link to the file or live stream is removed; the underlying file is not deleted.

Was this article helpful?

Related Articles

Contact Support
Can't find the answer you're looking for?
Contact Support