forked from AMWA-TV/is-04
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRegistrationAPI.raml
More file actions
168 lines (166 loc) · 6.76 KB
/
RegistrationAPI.raml
File metadata and controls
168 lines (166 loc) · 6.76 KB
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
167
168
#%RAML 1.0
# AMWA NMOS Discovery and Registration Specification: Registration API
# (c) AMWA 2016
title: Registration
baseUri: http://example.api.com/x-nmos/registration/{version}
version: v1.3
mediaType: application/json
types:
ErrorSchema: !include schemas/error.json
documentation:
- title: Overview
content: |
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 choose to implement Peer to Peer specification. The Registration API is a Write Only API.
- title: Further Documentation
content: |
Further normative documentation covering the behaviour of this API is contained in the [docs](../docs) folder of this repository.
/:
displayName: Base
get:
description: List of paths available from this API
responses:
200:
body:
example: !include ../examples/registrationapi-base-get-200.json
type: !include schemas/registrationapi-base.json
/resource:
displayName: Resource
options:
description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
responses:
200:
403:
post:
description: Create or update a registered resource
body:
example: !include ../examples/registrationapi-resource-post-request.json
type: !include schemas/registrationapi-resource-post-request.json
responses:
200:
body:
example: !include ../examples/registrationapi-resource-post-200.json
type: !include schemas/registrationapi-resource-response.json
headers:
Location:
example: /x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
description: The expected response for an update operation on an existing registered resource
201:
body:
example: !include ../examples/registrationapi-resource-post-200.json
type: !include schemas/registrationapi-resource-response.json
headers:
Location:
example: /x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
description: The expected response for a create operation performed for a previously unregistered resource
400:
description: 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:
type: ErrorSchema
409:
description: Returned when the resource already exists in the registry at a different API version. The correct API version is identified via the Location header.
body:
type: ErrorSchema
headers:
Location:
example: /x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
/{resourceType}/{resourceId}:
uriParameters:
resourceId:
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}$"
resourceType:
type: string
enum: [
"nodes",
"devices",
"sources",
"flows",
"senders",
"receivers"
]
options:
description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
responses:
200:
403:
delete:
description: Delete a registered resource
responses:
204:
description: The expected response, indicating 'No Content' following the DELETE
404:
description: Returned when the requested resource does not exist
body:
type: ErrorSchema
409:
description: Returned when the resource exists in the registry at a different API version. The correct API version is identified via the Location header.
body:
type: ErrorSchema
headers:
Location:
example: /x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
get:
description: Show a registered resource (for debug use only)
responses:
200:
body:
example: !include ../examples/registrationapi-resource-get-200.json
type: !include schemas/registrationapi-resource-response.json
404:
description: Returned when the requested resource does not exist
body:
type: ErrorSchema
409:
description: Returned when the resource exists in the registry at a different API version. The correct API version is identified via the Location header.
body:
type: ErrorSchema
headers:
Location:
example: /x-nmos/registration/{version}/resource/nodes/3b8be755-08ff-452b-b217-c9151eb21193
/health/nodes/{nodeId}:
displayName: Node health
uriParameters:
nodeId:
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}$"
options:
description: A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes
responses:
200:
403:
post:
description: Update Node health
responses:
200:
body:
example: !include ../examples/registrationapi-health-post-200.json
type: !include schemas/registrationapi-health-response.json
404:
description: Returned when the requested Node does not exist or has been garbage collected
body:
type: ErrorSchema
409:
description: 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.
body:
type: ErrorSchema
headers:
Location:
example: /x-nmos/registration/{version}/health/nodes/3b8be755-08ff-452b-b217-c9151eb21193
get:
description: Show a Node's health (for debug use only)
responses:
200:
body:
example: !include ../examples/registrationapi-health-get-200.json
type: !include schemas/registrationapi-health-response.json
404:
description: Returned when the requested Node does not exist or has been garbage collected
body:
type: ErrorSchema
409:
description: 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.
body:
type: ErrorSchema
headers:
Location:
example: /x-nmos/registration/{version}/health/nodes/3b8be755-08ff-452b-b217-c9151eb21193