Networked Media Open Specifications
DOCS APIS EXAMPLES VERSIONS IS BCP MS INFO REG DEVEL SEARCH

Controllers

←Behaviour - Nodes · Index↑ · Data Model→

Introduction

A Controller is Client software that interacts with the NMOS APIs to discover, connect and manage resources (Nodes, Devices, Senders and Receivers) within a networked media system.

Where this document refers to a User, this can include both human operators who drive a Controller manually and automation systems that drive a Controller programmatically.

General

HTTP APIs

Trailing Slashes

Controllers appending paths to href type attributes MUST support URLs both with and without a trailing slash, to avoid doubled or missing slashes.

Controllers performing requests other than GET or HEAD (i.e PUT, POST, DELETE, OPTIONS etc.) MUST use URLs with no trailing slash present.

API Versions

The versioning format is v<MAJOR>.<MINOR>

Versions MUST be represented as complete strings. Parsing MUST proceed as follows: separate into two strings, using the point (.) as a delimiter. Compare integer representations of MAJOR, MINOR version (such that v1.12 is greater than v1.5).

Implementers of Controllers are RECOMMENDED to support multiple versions of the NMOS APIs simultaneously in order to ease the upgrade process in live facilities.

API Common Keys

Controllers MUST follow the requirements for common API keys specified in the IS-04 APIs: Common Keys document including the requirements regarding use of URNs.

Error Codes & Responses

The NMOS APIs use HTTP status codes to indicate success, failure and other cases to Controllers as per RFC 7231 and related standards.

As explicit handling of every possible HTTP response code is not expected, Controllers MUST implement generic handling for ranges of response codes (1xx, 2xx, 3xx, 4xx and 5xx). However, where the API specifies explicit response codes the Controller SHOULD handle these cases explicitly.

When a Controller performs GET and HEAD requests, it MUST correctly handle a 301 (Moved Permanently) redirect to accommodate the API implementations permitted in the APIs: URLs: Approach to Trailing Slashes section of this specification.

If a Controller receives an HTTP 5xx or 4xx response code from the API, a failure has occurred. The Controller SHOULD display the content of the response’s error field to the User if possible.

Query API Discovery

NMOS Discovery makes use of the DNS Service Discovery (DNS-SD) protocol. The Query API: Client Interaction Procedure section of this specification describes the requirements in detail.

In order to locate the Query API, the Controller SHOULD support all of the following:

The Controller SHOULD offer unicast DNS-SD as the default mechanism.

Controllers MUST observe and interpret all of the TXT records returned with the DNS Service Discovery responses according to the requirements for Query API Clients specified in the APIs: API Paths section of this specification.

Query API

The Controller MUST be capable of using the Query API to discover any registered resource, including Node, Device, Source, Flow, Sender, and Receiver, as described in the APIs section of this specification.

When using the Query API, query filters SHOULD be used (and advanced query language where available) to cut down on the volume of resources returned to the Controller, as specified in the APIs: Query Parameters document.

Controllers MUST adhere to the Requirements for Query API Clients found in this specification.

Pagination

If using the HTTP API rather than WebSocket subscriptions, pagination requirements MUST be implemented as specified in the APIs: Query Parameters: Pagination section of this specification.

WebSocket Subscriptions

In order to avoid polling of the HTTP API, it is RECOMMENDED that Controllers use the WebSocket subscription mechanism.

Dynamic Update of Resources

The Controller MUST be capable of using the Query API to discover and dynamically report the state of any registered resource, including Node, Device, Source, Flow, Sender, and Receiver.

←Behaviour - Nodes · Index↑ · Data Model→