-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yml
363 lines (350 loc) · 10.4 KB
/
swagger.yml
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
swagger: "2.0"
info:
description: Python, Flask and Connexion server exposing GStreamer udp stream video composition functionality. SurfaceStreams enables merging of video streams based on alpha keying. Clients register with this server to provide their video stream and receive a merged stream from all other clients back.
version: "1.0.0"
title: SurfaceStreams Server ReST Article
consumes:
- application/json
produces:
- application/json
basePath: /api
# Paths supported by the server application
paths:
/server-config:
get:
operationId: handlers.server_config.read_all
tags:
- server-config
summary: Read the current SurfaceStreams server config
description: Read the current SurfaceStreams server config
responses:
200:
description: Successfully read server config
schema:
properties:
merged-stream-width:
type: integer
merged-stream-height:
type: integer
put:
operationId: handlers.server_config.update
tags:
- server-config
summary: Update the current SurfaceStreams server config
description: Update the current SurfaceStreams server config
parameters:
- name: config
in: body
schema:
type: object
properties:
merged-stream-width:
type: integer
merged-stream-height:
type: integer
responses:
200:
description: Successfully updated SurfaceStreams server config
/clients:
get:
operationId: handlers.clients.read_all
tags:
- clients
summary: Read the entire list of clients
description: Read the list of clients
parameters:
- name: length
in: query
type: integer
description: Number of clients to get from clients
required: false
- name: offset
in: query
type: integer
description: Offset from beginning of list where to start gathering clients
required: false
responses:
200:
description: Successfully read clients list operation
schema:
type: array
items:
properties:
id:
type: integer
name:
type: string
uuid:
type: string
ip:
type: string
video_src_port:
type: integer
video_sink_port:
type: integer
video_protocol:
type: string
created_datetime:
type: string
tuio_sink_port:
type: integer
mixing_mode:
type: string
post:
operationId: handlers.clients.create
tags:
- clients
summary: Create a client and add it to the clients list
description: Create a new client in the clients list (-1 for int, and "" for string means parameter is unset)
parameters:
- name: client
in: body
description: Person to create
required: True
schema:
type: object
properties:
name:
type: string
description: Name of client to create
default: "client"
video_src_port:
type: integer
description: Port for incoming client stream
default: 5001
video_sink_port:
type: integer
description: Port for outgoing merged stream (-1 means set dynamically)
default: -1
video_protocol:
type: string
description: Streaming protocol used for incoming and outgoing video stream
default: "jpeg"
tuio_sink_port:
type: integer
description: Port used for merged tuio stream (-1 means set dynamically)
default: -1
mixing_mode:
type: string
description: Rule used to mix several client video streams ('other' means only other client streams are overlayed. 'all' means clients own streams is mixed in as well.)
default: "other"
responses:
201:
description: Successfully created client in list
schema:
properties:
id:
type: integer
name:
type: string
uuid:
type: string
video_src_port:
type: integer
ip:
type: string
video_sink_port:
type: integer
video_protocol:
type: string
tuio_sink_port:
type: integer
created_datetime:
type: string
mixing_mode:
type: string
/clients/{uuid}:
get:
operationId: handlers.clients.read_one
tags:
- clients
summary: Read one client from the clients list
description: Read one client from the clients list
parameters:
- name: uuid
in: path
description: uuid of the client to get from the list
type: string
required: True
responses:
200:
description: Successfully read client from clients list operation
schema:
properties:
id:
type: integer
name:
type: string
uuid:
type: string
video_src_port:
type: integer
ip:
type: string
video_sink_port:
type: integer
video_protocol:
type: string
created_datetime:
type: string
mixing_mode:
type: string
put:
operationId: handlers.clients.update
tags:
- clients
summary: Update a client in the clients list
description: Update a client in the clients list
parameters:
- name: uuid
in: path
description: uuid of the client to update in the list (-1 for int, and "" for string means parameter is unset)
type: string
required: True
- name: client
in: body
schema:
type: object
properties:
name:
type: string
default: ""
video_src_port:
type: integer
default: -1
video_sink_port:
type: integer
default: -1
tuio_sink_port:
type: integer
default: -1
mixing_mode:
type: string
default: "other"
responses:
200:
description: Successfully updated client in clients list
delete:
operationId: handlers.clients.delete
tags:
- clients
summary: Delete a client from the clients list
description: Delete a client
parameters:
- name: uuid
in: path
type: string
required: True
responses:
200:
description: Successfully deleted a client from clients list
/images:
get:
operationId: handlers.images.read_all
tags:
- images
summary: Read the entire list of images
description: Read the list of images
parameters:
- name: length
in: query
type: integer
description: Number of images to get from images
required: false
- name: offset
in: query
type: integer
description: Offset from beginning of list where to start gathering images
required: false
responses:
200:
description: Successfully read images list operation
schema:
type: array
items:
properties:
name:
type: string
uuid:
type: string
created_datetime:
type: string
post:
operationId: handlers.images.create
tags:
- images
summary: Create a image and add it to the images list
description: Create a new image in the images list (-1 for int, and "" for string means parameter is unset)
parameters:
- name: image
in: body
description: Image to create
required: True
schema:
type: object
properties:
name:
type: string
description: Name of image to create
default: "image"
responses:
201:
description: Successfully created image in list
schema:
properties:
name:
type: string
uuid:
type: string
created_datetime:
type: string
/images/{uuid}:
get:
operationId: handlers.images.read
tags:
- images
summary: Read the entire list of images
description: Read the list of images
parameters:
- name: uuid
in: path
type: string
required: True
responses:
200:
description: Successfully read images list operation
schema:
type: file
put:
operationId: handlers.images.fill
tags:
- images
summary: Fill a image and add it to the images list
description: Fill an image in the images list
parameters:
- name: uuid
in: path
type: string
required: True
- name: data
in: formData
description: data to fill
required: True
type: file
responses:
200:
description: Successfully created image in list
delete:
operationId: handlers.images.delete
tags:
- images
summary: Delete an image from the images list
description: Delete an image
parameters:
- name: uuid
in: path
type: string
required: True
responses:
200:
description: Successfully deleted an image from images list