Query API documentation version v1.0
http://example.api.com/x-nmos/query/{version}
- version: required(v1.0)
Overview
The Query API is exposed by NMOS discovery Nodes. It is used to expose the contents of the (distributed) registry to all Nodes on the network. In smaller deployments where no such registry is available, Nodes with their own control capabilities fall back to interrogating Nodes directly using the Peer to Peer specification. This is a Read Only API.
Attributes defined as 'Optional' MUST be returned by the Query API if they exist within the registry. The presence declaration relates more to whether it is required for them to be registered at the Registration API side, or presented via the Node API.
mDNS Advertisement
Query APIs MUST produce an mDNS advertisement of the type _nmos-query._tcp
The mDNS advertisement MUST include a TXT record with key 'pri' and an integer value. Values 0 to 99 correspond to an active NMOS Query API (zero being the highest priority). Values 100+ are reserved for development work to avoid colliding with a live system. NB: In future versions of the specification it is likely that the 'priority' and 'weight' as specified by RFC 2782 will be used.
The IP address and port of the query API MUST be identified via the mDNS advertisement, with the HTTP path then being resolved via the standard NMOS API path documentation.
Base
List of paths available from this API
get /
List of paths available from this API
HTTP status code 200
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "Describes the Query API base resource",
"title": "Query API base resource",
"items": {
"type": "string",
"enum": [
"nodes/",
"sources/",
"flows/",
"devices/",
"senders/",
"receivers/",
"subscriptions/"
],
"minItems": 7,
"maxItems": 7,
"uniqueItems": true
}
}
Example:
[
"subscriptions/",
"flows/",
"sources/",
"nodes/",
"devices/",
"senders/",
"receivers/"
]
Nodes
List Nodes
get /nodes
List Nodes
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Node resources",
"title": "Collection of Nodes",
"items": {
"$ref": "node.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"version": "1441716120:318744030",
"hostname": "host1",
"label": "host1",
"href": "http://172.29.176.102:12345/",
"services": [
{
"href": "http://172.29.176.102:12345/x-manufacturer/status/",
"type": "urn:x-manufacturer:service:status"
},
{
"href": "http://172.29.176.102:12345/x-manufacturer/pipelinemanager/",
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "http://172.29.176.102:12345/x-manufacturer/mdnsbridge/",
"type": "urn:x-manufacturer:service:mdnsbridge"
}
],
"caps": {},
"id": "c8ba20e9-e197-4ec5-8764-4da672128589"
},
{
"version": "1441716067:450064243",
"hostname": "host2",
"label": "host2",
"href": "http://172.29.176.19:12345/",
"services": [
{
"href": "http://172.29.176.19:12345/x-manufacturer/pipelinemanager/",
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "http://172.29.176.19:12345/x-manufacturer/status/",
"type": "urn:x-manufacturer:service:status"
},
{
"href": "http://172.29.176.19:12345/x-manufacturer/mdnsbridge/",
"type": "urn:x-manufacturer:service:mdnsbridge"
}
],
"caps": {},
"id": "cebc6305-e8db-4026-aeb5-eb7a5620839e"
}
]
Get a single Node
get /nodes/{nodeId}
Get a single Node
URI Parameters
- nodeId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the Node and the services which run on it",
"title": "Node resource",
"required": [
"id",
"version",
"label",
"href",
"caps",
"services"
],
"properties": {
"id": {
"description": "Globally unique identifier for the Node",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"version": {
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"label": {
"description": "Freeform string label for the Node",
"type": "string"
},
"href": {
"description": "HTTP access href for the Node's API",
"type": "string",
"format": "uri"
},
"hostname": {
"description": "Node hostname (optional)",
"type": "string",
"format": "hostname"
},
"caps": {
"description": "Capabilities (not yet defined)",
"type": "object"
},
"services": {
"description": "Array of objects containing a URN format type and href",
"type": "array",
"items": {
"type": "object",
"required": ["href", "type"],
"properties": {
"href": {
"type": "string",
"description": "URL to reach a service running on the Node",
"format": "uri"
},
"type": {
"type": "string",
"description": "URN identifying the type of service",
"format": "uri"
}
}
}
}
}
}
Example:
{
"version": "1441716120:318744030",
"hostname": "host1",
"label": "host1",
"href": "http://172.29.176.102:12345/",
"services": [
{
"href": "http://172.29.176.102:12345/x-manufacturer/status/",
"type": "urn:x-manufacturer:service:status"
},
{
"href": "http://172.29.176.102:12345/x-manufacturer/pipelinemanager/",
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "http://172.29.176.102:12345/x-manufacturer/mdnsbridge/",
"type": "urn:x-manufacturer:service:mdnsbridge"
}
],
"caps": {},
"id": "c8ba20e9-e197-4ec5-8764-4da672128589"
}
HTTP status code 404
Returned when the requested Node ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
Sources
List Sources
get /sources
List Sources
Query Parameters
- device_id: required(string)
- label: required(string)
- description: required(string)
- format: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Source resources",
"title": "Collection of Sources",
"items": {
"$ref": "source.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"description": "Camera 1",
"format": "urn:x-nmos:format:video",
"tags": {
"SourceDeviceType": [
"UHD Camera"
],
"host": [
"host1"
],
"location": [
"Location 1"
]
},
"caps": {},
"version": "1441724551:288670563",
"parents": [],
"label": "Camera 1",
"id": "042a4126-0208-443d-bda6-833ffc27ed51",
"device_id": "21a28338-fb2e-4df5-9b55-d58e6124bc9f"
},
{
"description": "Camera 2",
"format": "urn:x-nmos:format:video",
"tags": {
"SourceDeviceType": [
"HD Camera"
],
"host": [
"host2"
],
"Location": [
"Location 2"
]
},
"caps": {},
"version": "1441722516:851371645",
"parents": [],
"label": "CaptureCardSourceVideo",
"id": "c23c6a65-8e91-4f6c-a484-046363dbca29",
"device_id": "65fa8c20-890e-4b86-87b2-cfd9df91b7f8"
},
{
"description": "Audio 1",
"format": "urn:x-nmos:format:audio",
"tags": {
"host": [
"host3"
]
},
"caps": {},
"version": "1441719058:3226205",
"parents": [],
"label": "Audio 1",
"id": "62cf8dd3-015b-49e3-84c1-1d866a7540bc",
"device_id": "e7aa15c4-f793-4d43-a0cb-c638db6215ac"
}
]
Get a single Source
get /sources/{sourceId}
Get a single Source
URI Parameters
- sourceId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a Source",
"title": "Source resource",
"required": [
"id",
"version",
"label",
"description",
"format",
"caps",
"tags",
"device_id",
"parents"
],
"properties": {
"id": {
"description": "Globally unique identifier for the Source",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"version": {
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"label": {
"description": "Freeform string label for the Source",
"type": "string"
},
"description": {
"description": "Detailed description of the Source",
"type": "string"
},
"format": {
"description": "Format of the data coming from the Source as a URN",
"type": "string",
"enum": [
"urn:x-nmos:format:video",
"urn:x-nmos:format:audio",
"urn:x-nmos:format:data"
],
"format": "uri"
},
"caps": {
"description": "Capabilities (not yet defined)",
"type": "object"
},
"tags": {
"description": "Key value set of freeform string tags to aid in filtering Sources. Values should be represented as an array of strings. Can be empty.",
"type": "object",
"patternProperties": {
"": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"device_id": {
"description": "Globally unique identifier for the Device which initially created the Source",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"parents": {
"description": "Array of UUIDs representing the Source IDs of Grains which came together at the input to this Source (may change over the lifetime of this Source)",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
}
}
}
Example:
{
"description": "Capture Card Source Video",
"format": "urn:x-nmos:format:video",
"tags": {
"SourceDeviceType": [
"HD Camera"
],
"host": [
"host1"
],
"Location": [
"Location 1"
]
},
"caps": {},
"version": "1441722516:851371645",
"parents": [],
"label": "CaptureCardSourceVideo",
"id": "c23c6a65-8e91-4f6c-a484-046363dbca29",
"device_id": "65fa8c20-890e-4b86-87b2-cfd9df91b7f8"
}
HTTP status code 404
Returned when the requested Source ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
Flows
List Flows
get /flows
List Flows
Query Parameters
- source_id: required(string)
- label: required(string)
- description: required(string)
- format: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Flow resources",
"title": "Collection of Flows",
"items": {
"$ref": "flow.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"description": "Off-air proxy",
"format": "urn:x-nmos:format:video",
"tags": {},
"label": "Off-air proxy",
"version": "1441724130:194944510",
"parents": [],
"source_id": "c7b1c809-84d4-427d-b6bb-c8397c66ce2b",
"id": "0c1f03d7-7e94-4b21-94d1-3ffbee8a0606"
},
{
"description": "Off-air",
"format": "urn:x-nmos:format:video",
"tags": {},
"label": "Off-air",
"version": "1441724130:186085940",
"parents": [],
"source_id": "c7b1c809-84d4-427d-b6bb-c8397c66ce2b",
"id": "0e85d87b-4b19-4452-aea3-984c9f94bbc9"
},
{
"description": "Capture Audio Proxy",
"format": "urn:x-nmos:format:audio",
"tags": {
"host": [
"host1"
]
},
"label": "Capture Audio Proxy",
"version": "1441812152:154331951",
"parents": [],
"source_id": "2aa143ac-0ab7-4d75-bc32-5c00c13d186f",
"id": "b3bb5be7-9fe9-4324-a5bb-4c70e1084449"
}
]
Get a single Flow
get /flows/{flowId}
Get a single Flow
URI Parameters
- flowId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a Flow",
"title": "Flow resource",
"required": [
"id",
"version",
"label",
"description",
"format",
"tags",
"source_id",
"parents"
],
"properties": {
"id": {
"description": "Globally unique identifier for the Flow",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"version": {
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"label": {
"description": "Freeform string label for the Flow",
"type": "string"
},
"description": {
"description": "Detailed description of the Flow",
"type": "string"
},
"format": {
"description": "Format of the data coming from the Flow as a URN",
"type": "string",
"enum": [
"urn:x-nmos:format:video",
"urn:x-nmos:format:audio",
"urn:x-nmos:format:data"
],
"format": "uri"
},
"tags": {
"description": "Key value set of freeform string tags to aid in filtering Flows. Values should be represented as an array of strings. Can be empty.",
"type": "object",
"patternProperties": {
"": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"source_id": {
"description": "Globally unique identifier for the Source which initially created the Flow",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"parents": {
"description": "Array of UUIDs representing the Flow IDs of Grains which came together to generate this Flow (may change over the lifetime of this Flow)",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
}
}
}
Example:
{
"description": "Capture Audio Proxy",
"format": "urn:x-nmos:format:audio",
"tags": {
"host": [
"host1"
]
},
"label": "Capture Audio Proxy",
"version": "1441812152:154331951",
"parents": [],
"source_id": "2aa143ac-0ab7-4d75-bc32-5c00c13d186f",
"id": "b3bb5be7-9fe9-4324-a5bb-4c70e1084449"
}
HTTP status code 404
Returned when the requested Flow ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
Devices
List Devices
get /devices
List Devices
Query Parameters
- node_id: required(string)
- label: required(string)
- description: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Device resources",
"title": "Collection of Devices",
"items": {
"$ref": "device.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"receivers": [],
"label": "pipeline 1 default device",
"version": "1441723957:582701772",
"senders": [
"c72cca5b-01db-47aa-bb00-03893defbfae",
"171d5c80-7fff-4c23-9383-46503eb1c63e",
"a2655c48-8a46-4c82-b9bc-98760d59d7f8"
],
"id": "c501ae64-f525-48b7-9816-c5e8931bc017",
"node_id": "1d452562-e1d5-4e84-b057-5c24de5f6b48",
"type": "urn:x-nmos:device:pipeline"
},
{
"receivers": [],
"label": "pipeline 1 default device",
"version": "1441976012:727999141",
"senders": [],
"id": "a30e4fba-254a-4e97-8bf7-daec80b8e57f",
"node_id": "3b8be755-08ff-452b-b217-c9151eb21193",
"type": "urn:x-nmos:device:pipeline"
},
{
"receivers": [
"a383178a-76cc-4894-9121-dc390c7847d3"
],
"label": "pipeline 1 default device",
"version": "1441722334:834709519",
"senders": [
"24da6ba7-b0aa-4883-a89a-2b867328dbf9"
],
"id": "e19ef82c-5f0a-48da-a86c-bb2377ab09a4",
"node_id": "4cf38bb4-d6c4-48d6-a086-6eac45d73ae5",
"type": "urn:x-nmos:device:pipeline"
},
{
"receivers": [
"863532de-a97d-4597-989a-e79688f2d5f9",
"632d7e6d-7357-44de-a425-a94fbe94974e",
"95ef711b-564d-4655-a98b-5b9ccfb419d7",
"9ee74607-f831-42f5-af08-a614ce0706df",
"1311bf13-869c-45b4-915e-8b4e8b8e26fd",
"debcd758-129d-4e0b-a0e3-f1d9ce5edfbc",
"0fee9741-e266-4c27-b480-1f897463ea4b",
"ef9e58bd-431a-466d-a67f-0318858b981c",
"68ca0867-ec4b-4eca-92e0-4c4c668a72b0"
],
"label": "pipeline 1 default device",
"version": "1441723676:366608283",
"senders": [],
"id": "a370d258-69de-4422-860a-ee4cf32ee9f4",
"node_id": "3a25a674-e6eb-4987-84ad-ef479fe4d527",
"type": "urn:x-nmos:device:pipeline"
}
]
Get a single Device
get /devices/{deviceId}
Get a single Device
URI Parameters
- deviceId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a Device",
"title": "Device resource",
"required": [
"id",
"version",
"label",
"type",
"node_id",
"senders",
"receivers"
],
"properties": {
"id": {
"description": "Globally unique identifier for the Device",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"version": {
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"label": {
"description": "Freeform string label for the Device",
"type": "string"
},
"type": {
"description": "Device type URN",
"type": "string",
"format": "uri"
},
"node_id": {
"description": "Globally unique identifier for the Node which initially created the Device",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"senders": {
"description": "UUIDs of Senders attached to the Device",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
},
"receivers": {
"description": "UUIDs of Receivers attached to the Device",
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
}
}
}
}
Example:
{
"receivers": [
"863532de-a97d-4597-989a-e79688f2d5f9",
"632d7e6d-7357-44de-a425-a94fbe94974e",
"95ef711b-564d-4655-a98b-5b9ccfb419d7",
"9ee74607-f831-42f5-af08-a614ce0706df",
"1311bf13-869c-45b4-915e-8b4e8b8e26fd",
"debcd758-129d-4e0b-a0e3-f1d9ce5edfbc",
"0fee9741-e266-4c27-b480-1f897463ea4b",
"ef9e58bd-431a-466d-a67f-0318858b981c",
"68ca0867-ec4b-4eca-92e0-4c4c668a72b0"
],
"label": "pipeline 1 default device",
"version": "1441723676:366608283",
"senders": [],
"id": "a370d258-69de-4422-860a-ee4cf32ee9f4",
"node_id": "3a25a674-e6eb-4987-84ad-ef479fe4d527",
"type": "urn:x-nmos:device:pipeline"
}
HTTP status code 404
Returned when the requested Device ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
Senders
List Senders
get /senders
List Senders
Query Parameters
- flow_id: required(string)
- label: required(string)
- description: required(string)
- transport: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Sender resources",
"title": "Collection of Senders",
"items": {
"$ref": "sender.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"description": "Camera 1",
"label": "Camera 1",
"manifest_href": "http://172.29.80.25/x-manufacturer/senders/4002d6b5-5775-4975-9859-5b330fcea288/stream.sdp",
"version": "1441724086:828491206",
"flow_id": "75bfddce-7142-4368-bb4a-8a82c837c6df",
"id": "4002d6b5-5775-4975-9859-5b330fcea288",
"transport": "urn:x-nmos:transport:rtp.mcast",
"device_id": "3a98e804-9871-4699-ba31-d608309d8933",
"tags": {}
},
{
"description": "Camera 2",
"label": "Camera 2",
"manifest_href": "http://172.29.176.146/x-manufacturer/senders/171d5c80-7fff-4c23-9383-46503eb1c63e/stream.sdp",
"version": "1441723958:235623703",
"flow_id": "b25d445a-20dc-4937-a8a1-5cb3d5c613ee",
"id": "171d5c80-7fff-4c23-9383-46503eb1c63e",
"transport": "urn:x-nmos:transport:rtp.mcast",
"device_id": "c501ae64-f525-48b7-9816-c5e8931bc017",
"tags": {}
},
{
"description": "Camera 2 Audio",
"label": "Camera 2 Audio",
"manifest_href": "http://172.29.176.81/x-manufacturer/senders/bb793530-8fd7-49f9-8514-314126bbc624/stream.sdp",
"version": "1441724039:737277493",
"flow_id": "4ffa5719-9ab9-4395-bedb-3534fa7ba438",
"id": "bb793530-8fd7-49f9-8514-314126bbc624",
"transport": "urn:x-nmos:transport:rtp.mcast",
"device_id": "5f88d383-596c-409c-887e-a90e42ef3684",
"tags": {}
}
]
Get a single Sender
get /senders/{senderId}
Get a single Sender
URI Parameters
- senderId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a sender",
"title": "Sender resource",
"required": [
"id",
"version",
"label",
"description",
"flow_id",
"transport",
"device_id",
"manifest_href"
],
"properties": {
"id": {
"description": "Globally unique identifier for the Sender",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"version": {
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"label": {
"description": "Freeform string label for the Sender",
"type": "string"
},
"description": {
"description": "Detailed description of the Sender",
"type": "string"
},
"flow_id": {
"description": "ID of the Flow currently passing via this Sender",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"transport": {
"description": "Transport type used by the Sender in URN format",
"type": "string",
"enum": [
"urn:x-nmos:transport:rtp",
"urn:x-nmos:transport:rtp.ucast",
"urn:x-nmos:transport:rtp.mcast",
"urn:x-nmos:transport:dash"
],
"format": "uri"
},
"tags": {
"description": "Key value set of freeform string tags to aid in filtering Senders. Values should be represented as an array of strings. Can be empty.",
"type": "object",
"patternProperties": {
"": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"device_id": {
"description": "Device ID which this Sender forms part of",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"manifest_href": {
"description": "HTTP URL to a file describing how to connect to the Sender (SDP for RTP)",
"type": "string",
"format": "uri"
}
}
}
Example:
{
"description": "Camera 1",
"label": "Camera 1",
"manifest_href": "http://172.29.176.146/x-manufacturer/senders/171d5c80-7fff-4c23-9383-46503eb1c63e/stream.sdp",
"version": "1441723958:235623703",
"flow_id": "b25d445a-20dc-4937-a8a1-5cb3d5c613ee",
"id": "171d5c80-7fff-4c23-9383-46503eb1c63e",
"transport": "urn:x-nmos:transport:rtp.mcast",
"device_id": "c501ae64-f525-48b7-9816-c5e8931bc017",
"tags": {}
}
HTTP status code 404
Returned when the requested Sender ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
Receivers
List Receivers
get /receivers
List Receivers
Query Parameters
- label: required(string)
- description: required(string)
- format: required(string)
- transport: required(string)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Receiver resources",
"title": "Collection of Receivers",
"items": {
"$ref": "receiver.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"description": "RTP receiver 1",
"tags": {
"Location": [
"Location 1"
]
},
"format": "urn:x-nmos:format:video",
"caps": {},
"device_id": "0d0cb97e-b96a-4a39-887f-d491492d9081",
"version": "1441895693:480000000",
"label": "Viewer 1",
"id": "3350d113-1593-4271-a7f5-f4974415bb8e",
"transport": "urn:x-nmos:transport:rtp",
"subscription": {
"sender_id": "55311762-8003-48fa-a645-0a0c7621ce45"
}
},
{
"description": "RTP receiver 2",
"tags": {
"Location": [
"Location 2"
]
},
"format": "urn:x-nmos:format:video",
"caps": {},
"device_id": "76aa31e5-c3a4-4639-8dbb-98a86dc32942",
"version": "1441726973:353560292",
"label": "Viewer 2",
"id": "3a1be8bd-6077-4933-aa7a-b42b13bdbe8e",
"transport": "urn:x-nmos:transport:rtp",
"subscription": {
"sender_id": "a325cfe1-47ee-4a23-9a5c-7b5fcb9c2bb2"
}
},
{
"description": "Audio RX",
"tags": {},
"format": "urn:x-nmos:format:audio",
"caps": {},
"device_id": "e19ef82c-5f0a-48da-a86c-bb2377ab09a4",
"version": "1441722334:801293520",
"label": "Audio RX",
"id": "a383178a-76cc-4894-9121-dc390c7847d3",
"transport": "urn:x-nmos:transport:rtp",
"subscription": {
"sender_id": null
}
}
]
Get a single Receiver
get /receivers/{receiverId}
Get a single Receiver
URI Parameters
- receiverId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a receiver",
"title": "Receiver resource",
"required": [
"id",
"version",
"label",
"description",
"format",
"caps",
"tags",
"device_id",
"transport",
"subscription"
],
"properties": {
"id": {
"description": "Globally unique identifier for the Receiver",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"version": {
"description": "String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating precisely when an attribute of the resource last changed",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"label": {
"description": "Freeform string label for the Receiver",
"type": "string"
},
"description": {
"description": "Detailed description of the Receiver",
"type": "string"
},
"format": {
"description": "Type of Flow accepted by the Receiver as a URN",
"type": "string",
"enum": [
"urn:x-nmos:format:video",
"urn:x-nmos:format:audio",
"urn:x-nmos:format:data"
],
"format": "uri"
},
"caps": {
"description": "Capabilities (not yet defined)",
"type": "object"
},
"tags": {
"description": "Key value set of freeform string tags to aid in filtering sources. Values should be represented as an array of strings. Can be empty.",
"type": "object",
"patternProperties": {
"": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"device_id": {
"description": "Device ID which this Receiver forms part of",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"transport": {
"description": "Transport type accepted by the Receiver in URN format",
"type": "string",
"enum": [
"urn:x-nmos:transport:rtp",
"urn:x-nmos:transport:rtp.ucast",
"urn:x-nmos:transport:rtp.mcast",
"urn:x-nmos:transport:dash"
],
"format": "uri"
},
"subscription": {
"description": "Object containing the 'sender_id' currently subscribed to. Sender_id should be null on initialisation.",
"type": "object",
"properties": {
"sender_id": {
"type": ["string", "null"],
"description": "UUID of the Sender that this Receiver is currently subscribed to",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
"default": null
}
}
}
}
}
Example:
{
"description": "RTP Receiver",
"tags": {
"Location": [
"Location 1"
]
},
"format": "urn:x-nmos:format:video",
"caps": {},
"device_id": "0d0cb97e-b96a-4a39-887f-d491492d9081",
"version": "1441895693:480000000",
"label": "Viewer",
"id": "3350d113-1593-4271-a7f5-f4974415bb8e",
"transport": "urn:x-nmos:transport:rtp",
"subscription": {
"sender_id": "55311762-8003-48fa-a645-0a0c7621ce45"
}
}
HTTP status code 404
Returned when the requested Receiver ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
Subscriptions
Create a websocket subscription to an API resource
List active connections to websockets providing real-time updates on resource changes (for debug use only)
post /subscriptions
Create a websocket subscription to an API resource
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Register a new resource or update an existing resource",
"title": "Resource registration",
"required": [
"max_update_rate_ms",
"persist",
"resource_path",
"params"
],
"properties": {
"max_update_rate_ms": {
"description": "Rate limiting for messages. Sets the minimum interval between consecutive websocket messages",
"type": "integer",
"default": 100
},
"persist": {
"description": "Whether to destroy the socket when the final client disconnects",
"type": "boolean",
"default": false
},
"resource_path": {
"description": "HTTP resource path in the query API which this subscription relates to",
"type": "string",
"enum": ["/nodes", "/devices", "/sources", "/flows", "/senders", "/receivers"]
},
"params": {
"description": "Object containing attributes to filter the resource on as per the Query Parameters specification. Can be empty.",
"type": "object"
}
}
}
Example:
{
"max_update_rate_ms": 100,
"resource_path": "/nodes",
"params": {
"label": "host1"
},
"persist": false
}
HTTP status code 200
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A single subscription resource registered with a Query API",
"title": "Subscription resource",
"required": [
"id",
"ws_href",
"max_update_rate_ms",
"persist",
"resource_path",
"params"
],
"properties": {
"id": {
"description": "Globally unique identifier for the subscription",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"ws_href": {
"description": "Address to connect to for the websocket subscription",
"type": "string",
"format": "uri"
},
"max_update_rate_ms": {
"description": "Rate limiting for messages. Sets the minimum interval between consecutive websocket messages",
"type": "integer",
"default": 100
},
"persist": {
"description": "Whether to destroy the socket when the final client disconnects",
"type": "boolean",
"default": false
},
"resource_path": {
"description": "HTTP resource path in the query API which this subscription relates to",
"type": "string",
"enum": ["/nodes", "/devices", "/sources", "/flows", "/senders", "/receivers"]
},
"params": {
"description": "Object containing attributes to filter the resource on as per the Query Parameters specification. Can be empty.",
"type": "object"
}
}
}
Example:
{
"max_update_rate_ms": 100,
"resource_path": "/nodes",
"params": {
"label": "host1"
},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=7c903667-7113-4a8f-8865-1c63f9070a9e",
"id": "7c903667-7113-4a8f-8865-1c63f9070a9e"
}
HTTP status code 201
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A single subscription resource registered with a Query API",
"title": "Subscription resource",
"required": [
"id",
"ws_href",
"max_update_rate_ms",
"persist",
"resource_path",
"params"
],
"properties": {
"id": {
"description": "Globally unique identifier for the subscription",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"ws_href": {
"description": "Address to connect to for the websocket subscription",
"type": "string",
"format": "uri"
},
"max_update_rate_ms": {
"description": "Rate limiting for messages. Sets the minimum interval between consecutive websocket messages",
"type": "integer",
"default": 100
},
"persist": {
"description": "Whether to destroy the socket when the final client disconnects",
"type": "boolean",
"default": false
},
"resource_path": {
"description": "HTTP resource path in the query API which this subscription relates to",
"type": "string",
"enum": ["/nodes", "/devices", "/sources", "/flows", "/senders", "/receivers"]
},
"params": {
"description": "Object containing attributes to filter the resource on as per the Query Parameters specification. Can be empty.",
"type": "object"
}
}
}
Example:
{
"max_update_rate_ms": 100,
"resource_path": "/nodes",
"params": {
"label": "host1"
},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=7c903667-7113-4a8f-8865-1c63f9070a9e",
"id": "7c903667-7113-4a8f-8865-1c63f9070a9e"
}
HTTP status code 400
Returned when the POST request is incorrectly formatted or missing mandatory attributes
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
get /subscriptions
List active connections to websockets providing real-time updates on resource changes (for debug use only)
HTTP status code 200
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of subscription resources",
"title": "Collection of subscriptions",
"items": {
"$ref": "queryapi-subscription-response.json"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
{
"max_update_rate_ms": 100,
"resource_path": "/receivers",
"params": {},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=6a52dbd5-a737-4c4e-823f-909ade8f8bf4",
"id": "6a52dbd5-a737-4c4e-823f-909ade8f8bf4"
},
{
"max_update_rate_ms": 100,
"resource_path": "/nodes",
"params": {},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=7c903667-7113-4a8f-8865-1c63f9070a9e",
"id": "7c903667-7113-4a8f-8865-1c63f9070a9e"
},
{
"max_update_rate_ms": 100,
"resource_path": "/senders",
"params": {},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=c5f5c1ad-f9e6-44c0-828f-da3f7cdef286",
"id": "c5f5c1ad-f9e6-44c0-828f-da3f7cdef286"
},
{
"max_update_rate_ms": 100,
"resource_path": "/flows",
"params": {},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=b0416004-f825-4623-bf90-575b5dd32f93",
"id": "b0416004-f825-4623-bf90-575b5dd32f93"
}
]
Get a single subscription (for debug use only)
Delete a single subscription
get /subscriptions/{subscriptionId}
Get a single subscription (for debug use only)
URI Parameters
- subscriptionId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 200
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A single subscription resource registered with a Query API",
"title": "Subscription resource",
"required": [
"id",
"ws_href",
"max_update_rate_ms",
"persist",
"resource_path",
"params"
],
"properties": {
"id": {
"description": "Globally unique identifier for the subscription",
"type": "string",
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
},
"ws_href": {
"description": "Address to connect to for the websocket subscription",
"type": "string",
"format": "uri"
},
"max_update_rate_ms": {
"description": "Rate limiting for messages. Sets the minimum interval between consecutive websocket messages",
"type": "integer",
"default": 100
},
"persist": {
"description": "Whether to destroy the socket when the final client disconnects",
"type": "boolean",
"default": false
},
"resource_path": {
"description": "HTTP resource path in the query API which this subscription relates to",
"type": "string",
"enum": ["/nodes", "/devices", "/sources", "/flows", "/senders", "/receivers"]
},
"params": {
"description": "Object containing attributes to filter the resource on as per the Query Parameters specification. Can be empty.",
"type": "object"
}
}
}
Example:
{
"max_update_rate_ms": 100,
"resource_path": "/nodes",
"params": {},
"persist": false,
"ws_href": "ws://172.29.80.52:8870/ws/?uid=7c903667-7113-4a8f-8865-1c63f9070a9e",
"id": "7c903667-7113-4a8f-8865-1c63f9070a9e"
}
HTTP status code 404
Returned when the requested Subscription ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
delete /subscriptions/{subscriptionId}
Delete a single subscription
URI Parameters
- subscriptionId: required(string - pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$)
HTTP status code 204
The expected response, indicating 'No Content' following the DELETE
HTTP status code 403
Returned when a DELETE request is made against a non-persistent subscription which is managed by the Query API and cannot be deleted
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}
HTTP status code 404
Returned when the requested Subscription ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes the standard error response which is returned with HTTP codes 400 and above",
"title": "Error response",
"required": [
"code",
"error",
"debug"
],
"properties": {
"code": {
"description": "HTTP error code",
"type": "integer",
"minimum": 400,
"maximum": 599
},
"error": {
"description": "Human readable message which is suitable for user interface display, and helpful to the user",
"type": "string"
},
"debug": {
"description": "Debug information which may assist a programmer working with the API",
"type": ["null", "string"]
}
}
}