Registration API documentation version v1.3
http://api.example.com/x-nmos/registration/{version}
- version: required(v1.3)
Overview
The Registration API is exposed by NMOS discovery Nodes. It is used to publish data to the distributed registry, which can then be queried via the Query API. In smaller deployments where no distributed registry is available, the Registration API is not used and discovery responsibilities fall to individual Nodes which implement the peer-to-peer specification. The Registration API is a write-only API.
Further Documentation
Further normative documentation covering the behaviour of this API is contained in the docs folder of this repository.
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 Registration API base resource",
"title": "Registration API base resource",
"items": {
"type": "string",
"enum": [
"resource/",
"health/"
]
},
"minItems": 2,
"maxItems": 2,
"uniqueItems": true
}
Example:
[
"resource/",
"health/"
]
Resource
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
Create or update a registered resource
post /resource
Create or update a registered 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": [
"type",
"data"
],
"oneOf": [
{
"properties": {
"type": {
"description": "Singular form of the resource type to be registered",
"type": "string",
"enum": ["node"]
},
"data": {
"$ref": "node.json"
}
}
},
{
"properties": {
"type": {
"description": "Singular form of the resource type to be registered",
"type": "string",
"enum": ["device"]
},
"data": {
"$ref": "device.json"
}
}
},
{
"properties": {
"type": {
"description": "Singular form of the resource type to be registered",
"type": "string",
"enum": ["sender"]
},
"data": {
"$ref": "sender.json"
}
}
},
{
"properties": {
"type": {
"description": "Singular form of the resource type to be registered",
"type": "string",
"enum": ["receiver"]
},
"data": {
"$ref": "receiver.json"
}
}
},
{
"properties": {
"type": {
"description": "Singular form of the resource type to be registered",
"type": "string",
"enum": ["source"]
},
"data": {
"$ref": "source.json"
}
}
},
{
"properties": {
"type": {
"description": "Singular form of the resource type to be registered",
"type": "string",
"enum": ["flow"]
},
"data": {
"$ref": "flow.json"
}
}
}
]
}
Example:
{
"type": "node",
"data": {
"version": "1441973902:879053935",
"hostname": "host1",
"label": "host1",
"description": "host1",
"tags": {},
"href": "http://172.29.80.65:12345/",
"api": {
"versions": ["v1.0", "v1.1", "v1.2", "v1.3"],
"endpoints": [
{
"host": "172.29.80.65",
"port": 12345,
"protocol": "http"
},
{
"host": "172.29.80.65",
"port": 443,
"protocol": "https",
"authorization": false
}
]
},
"services": [
{
"href": "https://172.29.80.65:443/x-manufacturer/pipelinemanager/",
"authorization": false,
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/status/",
"authorization": false,
"type": "urn:x-manufacturer:service:status"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/tally/",
"authorization": false,
"type": "urn:x-manufacturer:service:tally"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/mdnsbridge/",
"authorization": false,
"type": "urn:x-manufacturer:service:mdnsbridge"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/storequery/",
"authorization": false,
"type": "urn:x-manufacturer:service:storequery"
}
],
"caps": {},
"id": "3b8be755-08ff-452b-b217-c9151eb21193",
"clocks": [
{
"name": "clk0",
"ref_type":"internal"
},
{
"name": "clk1",
"ref_type":"ptp",
"traceable": true,
"version": "IEEE1588-2008",
"gmid": "08-00-11-ff-fe-21-e1-b0",
"locked": true
}
],
"interfaces": [
{
"name":"eth0",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d8",
"attached_network_device": {
"chassis_id": "2f-8c-af-a8-11-74",
"port_id": "Ethernet 1/3"
}
},
{
"name":"eth1",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d9",
"attached_network_device": {
"chassis_id": "2d-51-2b-de-4a-32",
"port_id": "Ethernet 1/2"
}
}
]
}
}
HTTP status code 200
The expected response for an update operation on an existing registered resource
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Returning a registered resource from the Registration API",
"title": "Registered resource",
"oneOf": [
{"$ref": "node.json"},
{"$ref": "device.json"},
{"$ref": "source.json"},
{"$ref": "flow.json"},
{"$ref": "sender.json"},
{"$ref": "receiver.json"}
]
}
Example:
{
"version": "1441973902:879053935",
"hostname": "host1",
"label": "host1",
"description": "host1",
"tags": {},
"href": "http://172.29.80.65:12345/",
"api": {
"versions": ["v1.0", "v1.1", "v1.2", "v1.3"],
"endpoints": [
{
"host": "172.29.80.65",
"port": 12345,
"protocol": "http"
},
{
"host": "172.29.80.65",
"port": 443,
"protocol": "https",
"authorization": false
}
]
},
"services": [
{
"href": "https://172.29.80.65:443/x-manufacturer/pipelinemanager/",
"authorization": false,
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/status/",
"authorization": false,
"type": "urn:x-manufacturer:service:status"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/tally/",
"authorization": false,
"type": "urn:x-manufacturer:service:tally"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/mdnsbridge/",
"authorization": false,
"type": "urn:x-manufacturer:service:mdnsbridge"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/storequery/",
"authorization": false,
"type": "urn:x-manufacturer:service:storequery"
}
],
"caps": {},
"id": "3b8be755-08ff-452b-b217-c9151eb21193",
"clocks": [
{
"name": "clk0",
"ref_type":"internal"
},
{
"name": "clk1",
"ref_type":"ptp",
"traceable": true,
"version": "IEEE1588-2008",
"gmid": "08-00-11-ff-fe-21-e1-b0",
"locked": true
}
],
"interfaces": [
{
"name":"eth0",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d8",
"attached_network_device": {
"chassis_id": "2f-8c-af-a8-11-74",
"port_id": "Ethernet 1/3"
}
},
{
"name":"eth1",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d9",
"attached_network_device": {
"chassis_id": "2d-51-2b-de-4a-32",
"port_id": "Ethernet 1/2"
}
}
]
}
HTTP status code 201
The expected response for a create operation performed for a previously unregistered resource
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Returning a registered resource from the Registration API",
"title": "Registered resource",
"oneOf": [
{"$ref": "node.json"},
{"$ref": "device.json"},
{"$ref": "source.json"},
{"$ref": "flow.json"},
{"$ref": "sender.json"},
{"$ref": "receiver.json"}
]
}
Example:
{
"version": "1441973902:879053935",
"hostname": "host1",
"label": "host1",
"description": "host1",
"tags": {},
"href": "http://172.29.80.65:12345/",
"api": {
"versions": ["v1.0", "v1.1", "v1.2", "v1.3"],
"endpoints": [
{
"host": "172.29.80.65",
"port": 12345,
"protocol": "http"
},
{
"host": "172.29.80.65",
"port": 443,
"protocol": "https",
"authorization": false
}
]
},
"services": [
{
"href": "https://172.29.80.65:443/x-manufacturer/pipelinemanager/",
"authorization": false,
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/status/",
"authorization": false,
"type": "urn:x-manufacturer:service:status"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/tally/",
"authorization": false,
"type": "urn:x-manufacturer:service:tally"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/mdnsbridge/",
"authorization": false,
"type": "urn:x-manufacturer:service:mdnsbridge"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/storequery/",
"authorization": false,
"type": "urn:x-manufacturer:service:storequery"
}
],
"caps": {},
"id": "3b8be755-08ff-452b-b217-c9151eb21193",
"clocks": [
{
"name": "clk0",
"ref_type":"internal"
},
{
"name": "clk1",
"ref_type":"ptp",
"traceable": true,
"version": "IEEE1588-2008",
"gmid": "08-00-11-ff-fe-21-e1-b0",
"locked": true
}
],
"interfaces": [
{
"name":"eth0",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d8",
"attached_network_device": {
"chassis_id": "2f-8c-af-a8-11-74",
"port_id": "Ethernet 1/3"
}
},
{
"name":"eth1",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d9",
"attached_network_device": {
"chassis_id": "2d-51-2b-de-4a-32",
"port_id": "Ethernet 1/2"
}
}
]
}
HTTP status code 400
Returned when the POST request is incorrectly formatted, missing mandatory attributes or breaches another condition which a Node is unlikely to be able to automatically correct.
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 409
Returned when the resource already exists in the registry at a different API version. The correct API version is identified via the Location header.
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
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"]
}
}
}
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
Delete a registered resource
Show a registered resource (for debug use only)
options /resource/{resourceType}/{resourceId}
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
delete /resource/{resourceType}/{resourceId}
Delete a registered resource
URI Parameters
- resourceType: required(one of nodes, devices, sources, flows, senders, receivers)
- resourceId: 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 404
Returned when the requested resource 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"]
}
}
}
HTTP status code 409
Returned when the resource exists in the registry at a different API version. The correct API version is identified via the Location header.
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
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 /resource/{resourceType}/{resourceId}
Show a registered resource (for debug use only)
URI Parameters
- resourceType: required(one of nodes, devices, sources, flows, senders, receivers)
- resourceId: 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": "Returning a registered resource from the Registration API",
"title": "Registered resource",
"oneOf": [
{"$ref": "node.json"},
{"$ref": "device.json"},
{"$ref": "source.json"},
{"$ref": "flow.json"},
{"$ref": "sender.json"},
{"$ref": "receiver.json"}
]
}
Example:
{
"version": "1441973902:879053935",
"hostname": "host1",
"label": "host1",
"description": "host1",
"tags": {},
"href": "http://172.29.80.65:12345/",
"api": {
"versions": ["v1.0", "v1.1", "v1.2", "v1.3"],
"endpoints": [
{
"host": "172.29.80.65",
"port": 12345,
"protocol": "http"
},
{
"host": "172.29.80.65",
"port": 443,
"protocol": "https",
"authorization": false
}
]
},
"services": [
{
"href": "https://172.29.80.65:443/x-manufacturer/pipelinemanager/",
"authorization": false,
"type": "urn:x-manufacturer:service:pipelinemanager"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/status/",
"authorization": false,
"type": "urn:x-manufacturer:service:status"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/tally/",
"authorization": false,
"type": "urn:x-manufacturer:service:tally"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/mdnsbridge/",
"authorization": false,
"type": "urn:x-manufacturer:service:mdnsbridge"
},
{
"href": "https://172.29.80.65:443/x-manufacturer/storequery/",
"authorization": false,
"type": "urn:x-manufacturer:service:storequery"
}
],
"caps": {},
"id": "3b8be755-08ff-452b-b217-c9151eb21193",
"clocks": [
{
"name": "clk0",
"ref_type":"internal"
},
{
"name": "clk1",
"ref_type":"ptp",
"traceable": true,
"version": "IEEE1588-2008",
"gmid": "08-00-11-ff-fe-21-e1-b0",
"locked": true
}
],
"interfaces": [
{
"name":"eth0",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d8",
"attached_network_device": {
"chassis_id": "2f-8c-af-a8-11-74",
"port_id": "Ethernet 1/3"
}
},
{
"name":"eth1",
"chassis_id":"b3-cd-09-bb-9b-d8",
"port_id":"b3-cd-09-bb-9b-d9",
"attached_network_device": {
"chassis_id": "2d-51-2b-de-4a-32",
"port_id": "Ethernet 1/2"
}
}
]
}
HTTP status code 404
Returned when the requested resource 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"]
}
}
}
HTTP status code 409
Returned when the resource exists in the registry at a different API version. The correct API version is identified via the Location header.
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
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"]
}
}
}
Node health
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
Update Node health
Show a Node's health (for debug use only)
post /health/nodes/{nodeId}
Update Node health
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:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Response to a request to update a resource's health",
"title": "Heartbeat response",
"required": [
"health"
],
"properties": {
"health": {
"description": "Timestamp indicating the time in seconds at which the server recorded the heartbeat",
"type": "string",
"pattern": "^[0-9]+$"
}
}
}
Example:
{
"health": "1441974485"
}
HTTP status code 404
Returned when the requested Node does not exist or has been garbage collected
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 409
Returned when the requested Node exists in the registry but at a different API version. The correct API version is identified via the Location header.
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/health/nodes/3b8be755-08ff-452b-b217-c9151eb21193
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 /health/nodes/{nodeId}
Show a Node's health (for debug use only)
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:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Response to a request to update a resource's health",
"title": "Heartbeat response",
"required": [
"health"
],
"properties": {
"health": {
"description": "Timestamp indicating the time in seconds at which the server recorded the heartbeat",
"type": "string",
"pattern": "^[0-9]+$"
}
}
}
Example:
{
"health": "1441974485"
}
HTTP status code 404
Returned when the requested Node does not exist or has been garbage collected
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 409
Returned when the requested Node exists in the registry but at a different API version. The correct API version is identified via the Location header.
Headers
- Location: required(string)
Example:
/x-nmos/registration/{version}/health/nodes/3b8be755-08ff-452b-b217-c9151eb21193
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"]
}
}
}