Skip to end of banner
Go to start of banner

Streams v4 API

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 9 Current »

Introduction

Streams v4 API allow clients (including proxy) to fetch stream URLs. No caching is used with the endpoints.

The endpoints return all available stream types (e.g.: hls, mss, dash), it is up to the client to choose the stream they prefer.

Stream protection

Currently the endpoints support EZDRM and plain (clear) streams.

Endpoints overview

IdEndpointHTTP methodPurpose
getChannelStreams/api/streams/v4/liveGETGet stream URLs for channel.
getRecordingStreams/api/streams/v4/recordingGETGet stream URLs for recording.

Entities overview

The resources descriptions could be found on API documentation page Streams v4 under schemas section.

StreamResource

Typical stream resource may look like the one below.

StreamResource example
{
    "id": "streamType-100001-hls",
    "type": "Stream",
    "attributes": {
        "type": "hls",
        "url": "https://org-01.amino.tv/drm/ezdrm.isml/playlist.m3u8",
        "drm": {
            "provider": "EZDRM",
            "fairplay": {
                "content_id": "2484bd14-0000-0000-0000-5c89a289d7c5",
                "la_url": "https://fps.ezdrm.com/api/licenses/2484bd14-0000-0000-0000-5c89a289d7c5",
                "cert": "https://org-01.amino.tv/fairplay.cer"
            },
            "widevine": {
                "content_id": "WTJoaGJtNWxiweE53PT0=",
                "la_url": "https://widevine-dash.ezdrm.com/proxy?pX=000000"
            },
            "playready": {
                "content_id": "WTJoaGJtNWxiweE53PT0=",
                "la_url": "https://playready.ezdrm.com/cency/preauth.aspx?pX=000000"
            }
        }
    }
}

DRM

"drm" attribute is optional, and schema may be varied in different DRM protections.

Authorization

All endpoints support API key authorization. The header named 'Authorization' with content "Apikey PUT_YOUR_API_KEY_HERE" must be passed with request.

API key is customer specific data and you should contact support person to obtain those.

Use Cases

Get streams by channel id

curl -X 'GET' \
  'https://{apidomain}/api/streams/v4/live?filter%5Btv_channel_id%5D=100' \
  -H 'accept: application/vnd.api+json' \
  -H 'Authorization: Apikey {PUT_YOUR_API_KEY_HERE}'

Get streams by external epg id

curl -X 'GET' \
  'https://{apidomain}/api/streams/v4/recording?filter%5Bexternal_epg_id%5D=12345' \
  -H 'accept: application/vnd.api+json' \
  -H 'Authorization: Apikey {PUT_YOUR_API_KEY_HERE}'

Postman collection

Postman collection was created which can be used to explore API, use cases and has possibility to configure it to use with client environment or with mocked environment:  

In the archive there is a collection itself and example mock environment. Both need to be imported into postman.

The collection consists of 2 folders:

API spec - just a plain listing of all available calls, those are not mocked.

UseCase - the folder contains typical API use cases, all of those are mocked and contain complete examples with requests and responses.




  • No labels