forked from AMWA-TV/is-04
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqueryapi-subscriptions-websocket.json
166 lines (166 loc) · 5.27 KB
/
queryapi-subscriptions-websocket.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Describes a data Grain sent via the a Query API websocket subscription",
"title": "Query API data Grain",
"required": [
"grain_type",
"source_id",
"flow_id",
"origin_timestamp",
"sync_timestamp",
"creation_timestamp",
"rate",
"duration",
"grain"
],
"properties": {
"grain_type": {
"description": "Type of data contained within the 'grain' attribute's payload",
"type": "string",
"enum": [
"event"
]
},
"source_id": {
"description": "Source ID of the Query API instance issuing the data Grain",
"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}$"
},
"flow_id": {
"description": "Subscription ID under the /subscriptions/ resource of the Query API",
"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}$"
},
"origin_timestamp": {
"description": "TAI timestamp at which this data Grain was generated in the format <ts_secs>:<ts_nsecs>",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"sync_timestamp": {
"description": "TAI timestamp at which this data Grain was generated in the format <ts_secs>:<ts_nsecs>",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"creation_timestamp": {
"description": "TAI timestamp at which this data Grain was generated in the format <ts_secs>:<ts_nsecs>",
"type": "string",
"pattern": "^[0-9]+:[0-9]+$"
},
"rate": {
"description": "Rate at which Grains will be received within this Flow (if applicable)",
"type": "object",
"required": [
"numerator",
"denominator"
],
"properties": {
"numerator": {
"description": "Numerator of the Grain rate",
"type": "integer",
"minimum": 0
},
"denominator": {
"description": "Denominator of the Grain rate",
"type": "integer",
"minimum": 1
}
}
},
"duration": {
"description": "Duration over which this Grain is valid or should be presented (if applicable)",
"type": "object",
"required": [
"numerator",
"denominator"
],
"properties": {
"numerator": {
"description": "Numerator of the Grain duration",
"type": "integer",
"minimum": 0
},
"denominator": {
"description": "Denominator of the Grain duration",
"type": "integer",
"minimum": 1
}
}
},
"grain": {
"description": "Payload of the data Grain",
"type": "object",
"required": [
"type",
"topic",
"data"
],
"properties": {
"type": {
"description": "Format classifier for the data contained in this payload",
"type": "string",
"format": "uri",
"enum": [
"urn:x-nmos:format:data.event"
]
},
"topic": {
"description": "Query API topic which has been subscribed to using this websocket",
"type": "string",
"enum": [
"/nodes/",
"/devices/",
"/sources/",
"/flows/",
"/senders/",
"/receivers/"
]
},
"data": {
"description": "An array of changes which have occurred and are being passed to the subscription client",
"type": "array",
"items": {
"description": "A single object identifying a change which has occurred under a particular API resource",
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"description": "ID of the resource which has undergone a change (may be a Node ID, Device ID etc.)",
"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}$"
},
"pre": {
"description": "Representation of the resource undergoing a change prior to the change occurring. Omitted if the resource didn't previously exist.",
"type": "object",
"oneOf": [
{"$ref": "node.json"},
{"$ref": "device.json"},
{"$ref": "source.json"},
{"$ref": "flow.json"},
{"$ref": "sender.json"},
{"$ref": "receiver.json"}
]
},
"post": {
"description": "Representation of the resource undergoing a change after the change had occurred. Omitted if the resource no longer exists.",
"type": "object",
"oneOf": [
{"$ref": "node.json"},
{"$ref": "device.json"},
{"$ref": "source.json"},
{"$ref": "flow.json"},
{"$ref": "sender.json"},
{"$ref": "receiver.json"}
]
}
}
},
"minItems": 1,
"uniqueItems": true
}
}
}
}
}