API routes - Channels
Documentation of the principal routes available in the serverside.ai API.
Channels - get schema
GET
https://admin.serverside.ai/api/v2/channels/schema
Returns the full channel JSON schema
Headers
x-api-key
string
Your serverside.ai API key
Channels - get
GET
https://admin.serverside.ai/api/v2/channels/
Gets a list of your channels.
Query Parameters
profileHash
string
The profile hash of the channel you want to find
sort
string
Field name to sort by. e.g. 'name'. For descending order, use e.g. '-name'
offset
number
Given the sort, which record to start the returned dataset from. Useful for paging.
limit
number
Max number of records to return
search
object
e.g. 'test'. Fields searched are name
, id
, titleId
. name
and id
are regex wildcard searches, e.g '*test*', titleId
is exact match.
Headers
x-api-key
string
Your serverside.ai API key
Channels - get by id
GET
https://admin.serverside.ai/api/v2/channels/:id
Gets an individual channel by its id.
Path Parameters
id
string
The id of the channel you want.
Headers
x-api-key
string
Your serverside.ai API Key
Channels - post
POST
https://admin.serverside.ai/api/v2/channels/
Creates a channel.
Headers
x-api-key
string
Your serverside.ai API key
Request Body
state
string
'enabled' or 'disabled'. Defaults to 'disabled'
profile
object
An appropriate encoding profile. If not provided, an AMS profile is automatically generated by analyzing the manifest.
sourceManifestUrl
string
URL that points to a valid HLS or DASH manifest
name
string
The name of your channel
apiKey
string
Any API key that secures the output stream
adSlateManifestUrl
string
Defaulted from the appropriate system settings if blank
adSource
object
{system, url, params} Defaulted from the appropriate system settings if empty
Required Fields
The minimum information required to create a channel using the serverside.ai API is:
sourceManifestUrl - URL that points to a valid HLS or DASH manifest. The serverside.ai API can automatically detect which.
name - A human-readable name for your channel.
adSource - e.g.
adSlateManifestUrl – e.g.
https://xyxyxyxyxyxyxyyx.blob.core.windows.net/ch1234id99/adslate.m3u8
Optional fields
The following optional fields can also be supplied:
apiKey – this is the API Key that secures access to the output stream, i.e. outputUri – if any such key is required.
profile - an AMS (Azure Media Services) encoding profile is automatically generated by analyzing the manifest if not provided.
state - defaults to
'disabled'
Process
First, the manifest is checked.
A 500 - 'Manifest Invalid'
error will be reported if:
The manifest cannot be found
It is not a valid HLS or DASH manifest
Its content is not correctly formatted so that the serverside.ai system can understand it
A 400 - 'No URL for the external system defined'
error will be reported if:
The system that provides the ad server information is not defined
The system that provides the ad server information is incorrectly defined
Assuming this first check succeeds, the manifest is then analyzed, and the corresponding (AMS) profile
, adSlateManifestUrl
and adSource
are generated (if not provided). adConditioner
and outputUri
are always automatically generated. These additional parameters are required to actually create the channel.
The channel is initially persisted using a 2nd API (SSAI API) which is connected to a REDIS cluster. Only when this step succeeds is the channel then written to the serverside.ai data store.
A channel is created in a `disabled` state and must be deliberately enabled, either in the Serverside.ai app or by an update call.
Errors
Example body
Channels - put
PUT
https://admin.serverside.ai/api/v2/channels/:id
Updates the specified channel.
Path Parameters
id
string
id (uuid) of the channel to update
Headers
x-api-key
string
Your serverside.ai API key
Request Body
profile
object
An appropriate encoding profile. If nto provided, an AMS profile is automatically generated from the manifest
state
boolean
Controls whether the channel is enabled
sourceManifestUrl
string
URL that points to a valid HLS or DASH manifest
name
string
The name of your channel
apiKey
string
Any API key that secures the output stream
adSlateManifestUrl
string
Defaulted from the appropriate system settings if not provided
adSource
object
{system, url, params}. Defaulted from the appropriate system settings if empty.
Mandatory fields for update
sourceManifestUrl
adSlateManifestUrl
adSource
name
Other fields that can be updated
state
- can be set to'enabled'
or'disabled'
There exist further states but they are set by the system only, and should be considered as equivalent to'disabled'
apiKey
profile
Process
Errors
Channels - setState
PUT
https://admin.serverside.ai/api/v2/channels/setState/:id
Enables or disables a channel.
Path Parameters
id
string
The channel's id (uuid)
Request Body
state
string
'disabled' or 'enabled'
Channels - delete
DELETE
https://admin.serverside.ai/api/v2/channels/:id
Deletes the specified channel.
Path Parameters
id
string
The channel's id (uuid)
Headers
x-api-key
string
Your serverside.ai API key
Last updated