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
Nodes
List Nodes
get /nodes
List Nodes
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
Sources
List Sources
get /sources
List Sources
Query Parameters
- device_id: required(string)
- label: required(string)
- description: required(string)
- format: required(string)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
Flows
List Flows
get /flows
List Flows
Query Parameters
- source_id: required(string)
- label: required(string)
- description: required(string)
- format: required(string)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
Devices
List Devices
get /devices
List Devices
Query Parameters
- node_id: required(string)
- label: required(string)
- description: required(string)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
Senders
List Senders
get /senders
List Senders
Query Parameters
- flow_id: required(string)
- label: required(string)
- description: required(string)
- transport: required(string)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
Example:
[
{
"description": "Camera 1",
"label": "Camera 1",
"manifest_href": "http://172.29.80.25:12345/x-nmos/node/v1.0/self/pipelinemanager/run/pipeline/1/pipel/ipp_rtptx2701/misc/sdp/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:12345/x-nmos/node/v1.0/self/pipelinemanager/run/pipeline/1/pipel/ipp_rtptxdfb1/misc/sdp/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:12345/x-nmos/node/v1.0/self/pipelinemanager/run/pipeline/1/pipel/ipp_rtptx10b7/misc/sdp/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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
Example:
{
"description": "Camera 1",
"label": "Camera 1",
"manifest_href": "http://172.29.176.146:12345/x-nmos/node/v1.0/self/pipelinemanager/run/pipeline/1/pipel/ipp_rtptxdfb1/misc/sdp/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
Receivers
List Receivers
get /receivers
List Receivers
Query Parameters
- label: required(string)
- description: required(string)
- format: required(string)
- transport: required(string)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
Subscriptions
Create a websocket subscription to an API resource
List active connections to websockets providing real-time updates on resource changes
post /subscriptions
Create a websocket subscription to an API resource
Body
Media type: application/json
Example:
{
"max_update_rate_ms": 100,
"resource_path": "/nodes",
"params": {
"label": "host1"
},
"persist": false
}
HTTP status code 200
Body
Media type: application/json
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
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
get /subscriptions
List active connections to websockets providing real-time updates on resource changes
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
Delete a single subscription
get /subscriptions/{subscriptionId}
Get 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}$)
Body
Media type: application/json
HTTP status code 200
Body
Media type: application/json
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
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}$)
Body
Media type: application/json
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
HTTP status code 404
Returned when the requested Subscription ID does not exist
Body
Media type: application/json