BYUB Media/Livestream Admin APIs (1.0.0)

Download OpenAPI specification:Download

Admin apis for manipulating media and livestream objects

Live Stream

The /live-stream admin endpoints are used to manage live stream

Get a livestream object

query Parameters
channel
required
string (Channel)
Enum: "byuradio" "byuradio_kumt" "byuradio_affiliate" "byuradio_adhoc" "byutv" "byutv-global" "byutv-international"
platform
required
string (Platform)
Enum: "roku" "web" "android" "androidtv" "firetv" "ios" "tvos" "xbox" "windows" "chromecast" "x1" "alexa" "samsung" "lg" "vizio" "googlehome" "system"
property
required
string (Property)
Enum: "byutv" "byuradio" "classical89"
apiClientKey
required
string

Responses

Response samples

Content type
application/json
{
  • "platform": "roku",
  • "property": "byutv",
  • "apiClientKey": "string",
  • "requireLogin": true,
  • "channel": "byuradio",
  • "assets": [
    ],
  • "exposure": {
    },
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Create or update a livestream object

Request Body schema: application/json
required

Live stream keys

platform
required
string
Enum: "roku" "web" "android" "androidtv" "firetv" "ios" "tvos" "xbox" "windows" "chromecast" "x1" "alexa" "samsung" "lg" "vizio" "googlehome" "system"
property
required
string
Enum: "byutv" "byuradio" "classical89"
apiClientKey
required
string
requireLogin
required
boolean
channel
required
string
Enum: "byuradio" "byuradio_kumt" "byuradio_affiliate" "byuradio_adhoc" "byutv" "byutv-global" "byutv-international"
required
Array of objects
object

Responses

Request samples

Content type
application/json
{
  • "platform": "roku",
  • "property": "byutv",
  • "apiClientKey": "string",
  • "requireLogin": true,
  • "channel": "byuradio",
  • "assets": [
    ],
  • "exposure": {
    }
}

Response samples

Content type
application/json
{
  • "platform": "roku",
  • "property": "byutv",
  • "apiClientKey": "string",
  • "requireLogin": true,
  • "channel": "byuradio",
  • "assets": [
    ],
  • "exposure": {
    },
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a livestream object by ID

query Parameters
channel
required
string (Channel)
Enum: "byuradio" "byuradio_kumt" "byuradio_affiliate" "byuradio_adhoc" "byutv" "byutv-global" "byutv-international"
platform
required
string (Platform)
Enum: "roku" "web" "android" "androidtv" "firetv" "ios" "tvos" "xbox" "windows" "chromecast" "x1" "alexa" "samsung" "lg" "vizio" "googlehome" "system"
property
required
string (Property)
Enum: "byutv" "byuradio" "classical89"
apiClientKey
required
string

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Get a default livestream object

query Parameters
channel
required
string (Channel)
Enum: "byuradio" "byuradio_kumt" "byuradio_affiliate" "byuradio_adhoc" "byutv" "byutv-global" "byutv-international"

Responses

Response samples

Content type
application/json
{
  • "requireLogin": true,
  • "channel": "byuradio",
  • "assets": [
    ],
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Create or update a default livestream object

Request Body schema: application/json
required

Live stream keys

requireLogin
required
boolean
channel
required
string
Enum: "byuradio" "byuradio_kumt" "byuradio_affiliate" "byuradio_adhoc" "byutv" "byutv-global" "byutv-international"
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "requireLogin": true,
  • "channel": "byuradio",
  • "assets": [
    ]
}

Response samples

Content type
application/json
{
  • "requireLogin": true,
  • "channel": "byuradio",
  • "assets": [
    ],
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Media

The /media admin admin are used to manage media

Get media objects by id

Retrieve multiple media objects by id by using the ids query parameter in the format ?ids[0]=...&ids[1]=....

query Parameters
ids
required
Array of strings <uuid> (MediaIds) <= 20 items [ items <uuid > ]

The media ids to retrieve. Use like ?ids[0]=...&ids[1]=....

Responses

Response samples

Content type
application/json
{
  • "mediaItems": [
    ]
}

Get media objects by id

Retrieve multiple media objects by id by using a list of ids in the body.

Responses

Response samples

Content type
application/json
{
  • "mediaItems": [
    ]
}

Get a media object

path Parameters
mediaId
required
string <uuid> (AdminMediaId)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "videoId": "string",
  • "ccId": "string",
  • "downloadable": false,
  • "length": "0.00:00:00.0000",
  • "assets": [ ],
  • "endMarker": "string",
  • "locators": [ ],
  • "exposures": [ ],
  • "requireLogin": true,
  • "isLiveNow": true,
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete a media object by ID

path Parameters
mediaId
required
string <uuid> (AdminMediaId)

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Save media objects in bulk

Creates new media objects or updates existing media objects

Request Body schema: application/json
required
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "media": [
    ]
}

Response samples

Content type
application/json
{
  • "success": true,
  • "failures": [
    ],
  • "savedItems": [
    ]
}

Create or update a media object

path Parameters
mediaId
string <uuid> (AdminMediaId)
query Parameters
forceCreate
boolean

When true, allows a media object to be created with a user-supplied id

Request Body schema: application/json
required

Media object data

id
string <uuid>
videoId
string or null
ccId
string or null
downloadable
boolean
length
string^-?[0-9].([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][...

A timespan string with long format (G) [-]d:hh:mm:ss.fffffff. https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings

Array of objects
Array of objects
Array of objects
requireLogin
boolean
isLiveNow
boolean

Responses

Request samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "videoId": "string",
  • "ccId": "string",
  • "downloadable": true,
  • "length": "string",
  • "assets": [
    ],
  • "locators": [
    ],
  • "exposures": [
    ],
  • "requireLogin": true,
  • "isLiveNow": true
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "videoId": "string",
  • "ccId": "string",
  • "downloadable": false,
  • "length": "0.00:00:00.0000",
  • "assets": [ ],
  • "endMarker": "string",
  • "locators": [ ],
  • "exposures": [ ],
  • "requireLogin": true,
  • "isLiveNow": true,
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Get the schedule for a media object

This api is not for use by the VMS. Retrieves the times the media object is used by a content item on a channel's schedule, along with other relevant metadata. This data is used to support auto-redirection to the livestream, indication of when the media is live, and information on when the program will start on the given stream. This data is synced with the schedule of the content item by an external process and should not be manually set. We decided to build this rather than respond to events, as it is more efficient to have the schedule on content items synced with an external process.

path Parameters
mediaId
required
string <uuid> (AdminMediaId)

Responses

Response samples

Content type
application/json
{
  • "mediaId": "5a8ffac5-2288-485d-b463-90c3cd9941ad",
  • "schedule": [
    ]
}

Set the schedule item array for a media object

This api is not for use by the VMS. Sets the schedule item array for a media object. This is used to support auto-redirection to the livestream, indication of when the media is live, and information on when the program will start on the given stream. This data is synced with the schedule of the content item by an external process and should not be manually set. We decided to build this rather than respond to events, as it is more efficient to have the schedule on content items synced with an external process.

path Parameters
mediaId
required
string <uuid> (AdminMediaId)
Request Body schema: application/json
required

The schedule array to set for the media object

mediaId
required
string <uuid>
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "mediaId": "5a8ffac5-2288-485d-b463-90c3cd9941ad",
  • "schedule": [
    ]
}

Response samples

Content type
application/json
{
  • "mediaId": "5a8ffac5-2288-485d-b463-90c3cd9941ad",
  • "schedule": [
    ]
}

Settings

The /settings admin admin are used to manage settings

get client settings

get client settings based on platform, property, apiclientkey

path Parameters
clientIdentifier
required
string (ClientIdentifier) ^(byutv|byuradio|classical89)-(roku|web|andro...

Value matching the client header the settings are assigned to

Responses

Response samples

Content type
application/json
{
  • "previewDuration": 0,
  • "requireLoginLivestream": true,
  • "requireLoginVOD": true,
  • "timeshiftEnabled": true,
  • "timeshiftBufferMinutes": 0,
  • "clientId": "string",
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

save new client settings

save new client settings with clientId, settings, requireLoginLivestream (requires logged in user to access livestream media), requireLoginVOD (requires logged in user to access on demand video media)

Responses

Response samples

Content type
application/json
{
  • "previewDuration": 0,
  • "requireLoginLivestream": true,
  • "requireLoginVOD": true,
  • "timeshiftEnabled": true,
  • "timeshiftBufferMinutes": 0,
  • "clientId": "string",
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Upload Url

The /upload-url admin admin are used to manage upload

Get an upload url

query Parameters
mediaId
required
string <uuid> (AdminMediaId)
fileName
required
string (FileName)

Responses

Response samples

Content type
application/json
{
  • "url": "string",
  • "fields": {
    }
}

Delete an uploaded media file

query Parameters
mediaId
required
string <uuid> (AdminMediaId)
fileName
required
string (FileName)

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Get a save path

query Parameters
mediaId
required
string <uuid> (AdminMediaId)
fileName
required
string (FileName)

Responses

Response samples

Content type
application/json
{
  • "savePath": "string",
  • "publicUrl": "string"
}

Url Params

The /url-params admin admin are used to manage url params

Get a url param set for a specific client, provider and content type

query Parameters
platform
required
string (Platform)
Enum: "roku" "web" "android" "androidtv" "firetv" "ios" "tvos" "xbox" "windows" "chromecast" "x1" "alexa" "samsung" "lg" "vizio" "googlehome" "system"

The platform of the client (web, roku, etc)

property
required
string (Property)
Enum: "byutv" "byuradio" "classical89"

The property of the client (byutv, byuradio, etc)

apiClientKey
required
string

The api key for the client (not the client header, just the api key portion)

provider
required
string (Provider)
Enum: "verizon" "amazon" "youtube" "byubmp3"

The provider that serves up the media

assetType
required
string (Provider)
Enum: "verizon" "amazon" "youtube" "byubmp3"

The asset type of the media asset

dataType
required
string (ContentType)
Enum: "media" "livestream"

The type of media service object these parameters apply to (livestream or media)

Create or update a set of url params for a specific client, provider, assetType, and content type

Request Body schema: application/json
required

Url parameters

required
Array of objects
provider
required
string
Enum: "verizon" "amazon" "youtube" "byubmp3"

The provider serving the media asset

platform
required
string
Enum: "roku" "web" "android" "androidtv" "firetv" "ios" "tvos" "xbox" "windows" "chromecast" "x1" "alexa" "samsung" "lg" "vizio" "googlehome" "system"
property
required
string
Enum: "byutv" "byuradio" "classical89"
assetType
required
string
Enum: "hls1" "dash1" "mp3" "mp4" "aac" "aac-stream" "mp3-stream"
apiClientKey
required
string
dataType
required
string
Enum: "media" "livestream"

Responses

Request samples

Content type
application/json
{
  • "params": [
    ],
  • "provider": "verizon",
  • "platform": "roku",
  • "property": "byutv",
  • "assetType": "hls1",
  • "apiClientKey": "string",
  • "dataType": "media"
}

Response samples

Content type
application/json
{
  • "params": [
    ],
  • "provider": "verizon",
  • "platform": "roku",
  • "property": "byutv",
  • "assetType": "hls1",
  • "apiClientKey": "string",
  • "dataType": "media",
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

Delete all the url params for the specified client, provider, and content type

query Parameters
platform
required
string (Platform)
Enum: "roku" "web" "android" "androidtv" "firetv" "ios" "tvos" "xbox" "windows" "chromecast" "x1" "alexa" "samsung" "lg" "vizio" "googlehome" "system"

The platform of the client (web, roku, etc)

property
required
string (Property)
Enum: "byutv" "byuradio" "classical89"

The property of the client (byutv, byuradio, etc)

apiClientKey
required
string

The api key for the client

provider
required
string (Provider)
Enum: "verizon" "amazon" "youtube" "byubmp3"

The provider that serves up the media

dataType
required
string (ContentType)
Enum: "media" "livestream"

The type of media service object these parameters apply to (livestream or media)

Responses

Response samples

Content type
application/json
{
  • "success": true
}

Cache

Clear Cache

Clears the in-memory cache

Responses

Response samples

Content type
application/json
{
  • "success": true
}

System Settings

get media system settings

get media system settings

Responses

Response samples

Content type
application/json
{
  • "forceRequireLoginFalse": true,
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}

save new media system settings

save new media system settings with forceRequireLoginFalse (Be able to toggle requiring login)

Responses

Response samples

Content type
application/json
{
  • "forceRequireLoginFalse": true,
  • "createdBy": {
    },
  • "updatedBy": {
    },
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z"
}