Repository navigation
Expand file tree
/
Copy pathVideoController.yaml
More file actions
340 lines (333 loc) · 9.31 KB
/
Copy pathVideoController.yaml
File metadata and controls
340 lines (333 loc) · 9.31 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
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
swagger: '2.0'
info:
description: >
This is a sample swagger file to explore some of the Synology Web APIs.
[Generate your own swagger file](https://github.com/mikespub/synology)
If you want to try this out on your own Synology, this requires adding
a rest.php file in the base directory of your Web Station to act as a
gateway to the actual Synology Web APIs.
Except for SYNO.API.Info query, most API calls assume that you have
logged in first via SYNO.API.Auth, and received a session id (sid).
You will need to update the default value of the _sid parameter below
in your swagger file so that all API calls can use the right value.
There are many versions of the swagger file available, one using short
urls with query parameters, and the other specifying the complete path
including the 4 standard parameters for each API method. Any special
additional parameters needed for a particular API method are not taken
into account here (except for login).
version: 1.0.0
title: Synology Web API Explorer
contact:
url: 'https://github.com/mikespub/synology/issues'
license:
name: MIT
url: 'https://opensource.org/licenses/MIT'
host: diskstation
basePath: /rest.php
schemes:
- http
securityDefinitions:
query_sid:
type: apiKey
name: _sid
in: query
consumes:
- application/json
- text/plain
produces:
- application/json
- text/plain
definitions:
NormalResponse:
type: object
properties:
success:
type: boolean
description: '"true" when the request finishes successfully, "false" when the request fails with an error code.'
data:
type: object
description: The data object contains all the response information described in each method.
error:
type: object
properties:
code:
type: integer
description: An integer number error code will be returned when a request fails.
errors:
type: array
items:
type: object
paths:
/SYNO.API.Info/v1/query:
get:
tags:
- API
summary: Return query for SYNO.API.Info
operationId: API_Info_query
parameters:
- in: query
name: query
description: Requested API information
required: true
type: string
default: all
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
/SYNO.API.Auth/v4/login:
get:
tags:
- API
summary: Return login for SYNO.API.Auth
operationId: API_Auth_login
parameters:
- in: query
name: account
description: Username
required: false
type: string
default: username
- in: query
name: passwd
description: Password
required: false
type: string
default: passwd
- in: query
name: session
description: Session Name
required: true
type: string
default: DownloadStation
- in: query
name: format
description: Format (cookie or sid)
required: false
type: string
default: sid
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
/SYNO.API.Auth/v4/logout:
get:
tags:
- API
summary: Return logout for SYNO.API.Auth
operationId: API_Auth_logout
parameters:
- in: query
name: session
description: Session Name
required: true
type: string
default: DownloadStation
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Device/v1/list:
get:
tags:
- VideoController.Device
summary: Return list for SYNO.VideoController.Device
operationId: Device_list
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Password/v1/setpassword:
get:
tags:
- VideoController.Password
summary: Return setpassword for SYNO.VideoController.Password
operationId: Password_setpassword
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Password/v1/testpassword:
get:
tags:
- VideoController.Password
summary: Return testpassword for SYNO.VideoController.Password
operationId: Password_testpassword
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Playback/v2/play:
get:
tags:
- VideoController.Playback
summary: Return play for SYNO.VideoController.Playback
operationId: Playback_play
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Playback/v2/pause:
get:
tags:
- VideoController.Playback
summary: Return pause for SYNO.VideoController.Playback
operationId: Playback_pause
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Playback/v2/stop:
get:
tags:
- VideoController.Playback
summary: Return stop for SYNO.VideoController.Playback
operationId: Playback_stop
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Playback/v2/seek:
get:
tags:
- VideoController.Playback
summary: Return seek for SYNO.VideoController.Playback
operationId: Playback_seek
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Playback/v2/status:
get:
tags:
- VideoController.Playback
summary: Return status for SYNO.VideoController.Playback
operationId: Playback_status
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Playback/v2/set_repeat:
get:
tags:
- VideoController.Playback
summary: Return set_repeat for SYNO.VideoController.Playback
operationId: Playback_set_repeat
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Volume/v1/setvolume:
get:
tags:
- VideoController.Volume
summary: Return setvolume for SYNO.VideoController.Volume
operationId: Volume_setvolume
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []
/SYNO.VideoController.Volume/v1/getvolume:
get:
tags:
- VideoController.Volume
summary: Return getvolume for SYNO.VideoController.Volume
operationId: Volume_getvolume
responses:
'200':
description: Normal Response
schema:
$ref: '#/definitions/NormalResponse'
default:
description: Abnormal Response
schema:
type: object
security:
- query_sid: []