Events API documentation version v1.0
http://example.api.com/x-nmos/events/{version}
- version: required(v1.0)
Overview
The Events API is exposed by each NMOS Device in a system that supports AMWA NMOS Event & Tally Specification. The API is used to announce the type definitions used by the Event & Tally sources and for the receiving devices to be able to check the current source state.
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: json
Content:
{
"$id": "https://www.amwa.tv/event_and_tally/base.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "Describes the Events API base resource",
"title": "Events API base resource",
"items": {
"type": "string",
"enum": [
"sources/"
],
"minItems": 1,
"maxItems": 1,
"uniqueItems": true
}
}
Example:
[
"sources/"
]
Sources
List of the Event & Tally compatible sources
get /sources
List of the Event & Tally compatible sources
HTTP status code 200
Body
Media type: application/json
Type: json
Content:
{
"$id": "https://www.amwa.tv/event_and_tally/sources.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "A list of Event & Tally Source resources",
"title": "Collection of Event & Tally Sources",
"items": {
"description": "IDs of the Event & Tally compatible sources",
"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}\\/$"
},
"minItems": 0,
"uniqueItems": true
}
Example:
[
"1ea39324-a32b-4e1d-86e9-33f9956ebc60/",
"f9c7b88b-1846-43d9-9e53-c230e77d91ac/"
]
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:
{
"$id": "https://www.amwa.tv/event_and_tally/source.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"description": "Describes the Event & Tally source",
"title": "Event & Tally source",
"items": {
"type": "string",
"enum": [
"type/",
"state/"
],
"minItems": 2,
"maxItems": 2,
"uniqueItems": true
}
}
Example:
[
"state/",
"type/"
]
HTTP status code 404
Returned when the requested Source ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$id": "https://www.amwa.tv/event_and_tally/error.json",
"$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"]
}
}
}
JSON containing detailed type information
get /sources/{sourceId}/type
JSON containing detailed type information
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:
{
"$id": "https://www.amwa.tv/event_and_tally/type.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Type definition",
"title": "Type definition",
"oneOf": [
{ "$ref": "type_boolean.json" },
{ "$ref": "type_boolean_enum.json" },
{ "$ref": "type_number.json" },
{ "$ref": "type_number_enum.json" },
{ "$ref": "type_string.json" },
{ "$ref": "type_string_enum.json" }
]
}
Example:
{
"type": "boolean"
}
HTTP status code 404
Returned when the requested Source ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$id": "https://www.amwa.tv/event_and_tally/error.json",
"$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"]
}
}
}
JSON containing the last state change notification sent over the transport protocols
get /sources/{sourceId}/state
JSON containing the last state change notification sent over the transport protocols
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:
{
"$id": "https://www.amwa.tv/event_and_tally/event.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Message that gets sent out when the source state changes",
"title": "State change event",
"oneOf": [{
"$ref": "event_boolean.json"
}, {
"$ref": "event_number.json"
}, {
"$ref": "event_string.json"
}, {
"$ref": "event_object.json"
}]
}
Example:
{
"identity": {
"source_id": "1ea39324-a32b-4e1d-86e9-33f9956ebc60"
},
"event_type": "boolean",
"timing": {
"creation_timestamp": "1532504241:104000200"
},
"payload": {
"value": false
},
"message_type": "state"
}
HTTP status code 404
Returned when the requested Source ID does not exist
Body
Media type: application/json
Type: json
Content:
{
"$id": "https://www.amwa.tv/event_and_tally/error.json",
"$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"]
}
}
}