Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

This page summarizes the information that is relevant to client developers wanting to upgrade to our currently supported API versions.

Channels

Currently v3 of our Channel API is in Beta and it is not recommended for clients to upgrade.

Table of Contents

Migrating to the new PlayableStream format endpoints

Using the old endpoint

Currently the client will call our "play" endpoint which returns an JSON object containing the URL where the stream is available and the DRM information required to play it.

Endpoint examplehttps://tv.delta.nl/api/channel/38/stream/103/play?userEmail=boox6%40cloudpvr.nl&service=delta_test&ajax=1&startover=false&stream_type=hls&service=delta_test

Using the new endpoint

Our new endpoint PlayableStream related to Channel (live) returns similar information, but is more detailed.

The chief differences to note are:

  • The startover parameter is renamed to "restart_at_beginning"
  • The following parameters are no longer required or supported:
    • service
    • ajax
    • stream_type
  • The API will return a number of different stream_types and let the client pick which one to display
    • The "suggested_devices" key in the response is non-normative and is just a suggestion
Code Block
languagejs
themeMidnight
titleResponse structure
linenumberstrue
collapsetrue
{ "data": [ { "id": 123, "type": "Stream", "attributes": [ { "id": 0, "profile_name": "string", "suggested_devices": [ "string" ], "codec_info": "string", "transport_protocol": "string", "streaming_protocols": [ "string" ], "bitrate": 0, "max_resolution": "string", "max_fps": "string", "vbr_max_bitrate": 0, "stream_url": "string", "protection_types": [ "string" ], "protection_keys": [ { "type": "string", "key": "string", "laUrl": "string" } ] } ] } ] }

Child pages (Children Display)


Summary of version numbers and their lifecycle

VersionCommentUsage notes
1.xDeprecated endpointsDo not use
2.xMost of the endpoints are still current in active support.Check the endpoint lifecycle here before using it
3.0 and 3.1These are limited to the EPG endpoints.  These endpoints follow the "old" philosophy. At time of writing (Q3 2019) we don't recommend upgrading from v2 to v3 because v4 is soon to be released.
4.xThese are new endpoints following our "new" philosophy that improves REST compliance.These are the endpoints we would prefer you to use.

Introduction to V4

The migration documentation for each section will explain the differences in more detail so this is just a high level overview of "what's new".

V4 is an ongoing redesign of our API to make it more REST compliant.  More of the new endpoints will be rolled out as features and improvements are deployed.

You will notice that endpoints are focused on specific resources, and we limit the relationships that can be fetched. 

This reduces parameter variability and the amount of data that must be pulled from the database;  As a result the response should be quicker to generate and easier to cache.

You'll notice that the responses adhere to the JSON API 1.0 standard (http://jsonapi.org/) and wherever possible the recommendations have been accepted as well.