-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServices.Local.Media.SMB.json
613 lines (613 loc) · 26.5 KB
/
Services.Local.Media.SMB.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
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
{
"paths": {
"Services.Local.Media.SMB.Get": {
"operationId": "Services.Local.Media.SMB.Get",
"summary": "Retrieves the status and configuration parameters in regards to the SMB Server.",
"tags": [
"Services.Local.Media.SMB"
],
"responses": {
"ARGUMENT_DATA_TYPE_MISMATCH": {
"description": "A call attempt to a valid object and procedure was performed, however an argument value was provided with an unexpected data type, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_DATA_TYPE_MISMATCH\", \"Description\": \"Unable to process the request because the value provided on the \\u2018Enabled\\u2019 field is not a valid Boolean.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"ARGUMENT_NOT_FOUND": {
"description": "A call to a valid object and procedure was performed, however an unrecognized argument was provided, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_NOT_FOUND\", \"Description\": \"Unable to process the request because 'Enabled' is not a valid argument.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"ARGUMENT_REQUIRED_MISSING": {
"description": "A call to a valid object and procedure was performed, however a required argument was not provided, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_REQUIRED_MISSING\", \"Description\": \"Unable to process the request because the 'Enabled' field was not provided.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"ARGUMENT_VALUE_NOT_SUPPORTED": {
"description": "A call attempt to a valid object and procedure was performed, however a non-supported argument value was provided, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_VALUE_NOT_SUPPORTED\", \"Description\": \"Unable to process the request because \\u2018Red\\u2019 is not a value supported by the \\u2018Colour\\u2019 field.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"METHOD_NOT_FOUND": {
"description": "A call to a valid object but non-existing procedure was performed, therefore it was not possible to process the request.",
"raised_by": "IPC Bus",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"METHOD_NOT_FOUND\", \"Description\": \"Unable to process the request because 'Set' is not a valid method\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OBJECT_NOT_FOUND": {
"description": "A call to a non-existing object was performed, therefore it was not possible to process the request.",
"raised_by": "IPC Bus",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OBJECT_NOT_FOUND\", \"Description\": \"Unable to process the request because 'prpl.Dummy' is not a valid object.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OK": {
"description": "A well-formed request to an authorized resource was performed, and the receiver was able to compute the response within the allowed time-window.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OK\"}, \"Body\": {\"Enabled\": true, \"Status\": \"Active\", \"Version\": \"3.1.1\", \"Hostname\": \"prplFoundation HGW\"}}",
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Response"
},
{
"properties": {
"Body": {
"properties": {
"Enabled": {
"type": "Boolean",
"description": "SMB Server administrative status.",
"format": "-",
"default_value": "-",
"possible_values": "\"true\" or \"false\"",
"enum": [
"true",
"false"
],
"readOnly": true
},
"Hostname": {
"type": "String",
"description": "SMB Server hostname.",
"format": "-",
"default_value": "-",
"possible_values": "any string with length from 1 up to 64 chars",
"readOnly": true
},
"Status": {
"type": "String",
"description": "SMB Server operational status.",
"format": "-",
"default_value": "-",
"possible_values": "\"Active\", \"Disabled\", \"Error\"",
"readOnly": true
},
"Version": {
"type": "String",
"description": "SMB Server version or release number.",
"format": "-",
"default_value": "-",
"possible_values": "\"1.0\", \"2.0\", \"3.0\", \"3.0.2\", \"3.1.1\"",
"readOnly": true
}
},
"required": []
}
}
}
]
}
}
}
},
"OPERATION_ALREADY_IN_PROGRESS": {
"description": "A well-formed request to an authorized resource was performed, however the operation could not be completed, as the required resource was temporarily locked by a different request in progress.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_ALREADY_IN_PROGRESS\", \"Description\": \"Unable to process the request because there is a duplicate operation currently in progress.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_ERROR": {
"description": "A well-formed request was performed however, it was not possible to process the request due to an unknown internal error.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_ERROR\", \"Description\": \"Unable to process the request because there is a configuration error.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_ILLEGAL": {
"description": "A well-formed request to an authorized resource was performed, however the operation could not be completed, as it was invoked in the incorrect system state or order.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_ILLEGAL\", \"Description\": \"Unable to process the request because the 'Stop' procedure can only be invoked after the 'Start' method has been called.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_PERMISSION_DENIED": {
"description": "A well-formed request was performed however, the client did not meet the security conditions required to access the protected resource, therefore it is not possible to process the request.",
"raised_by": "IPC Bus / Remote Protocol Adapter",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_PERMISSION_DENIED\", \"Description\": \"Unable to process the request because user \\u2018Admin\\u2019 does not have access privileges to invoke the \\u2018Set\\u2019 procedure on object \\u2018prpl.Dummy\\u2019.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_TIMEOUT": {
"description": "A well-formed request was performed however, it was not possible to process the response within the allowed time-frame.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_TIMEOUT\", \"Description\": \"The operation has been aborted because the service did not respond within the expected 5 seconds time-frame.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
}
}
},
"Services.Local.Media.SMB.Set": {
"operationId": "Services.Local.Media.SMB.Set",
"summary": "Modifies the status and configuration parameters of the SMB Server.",
"tags": [
"Services.Local.Media.SMB"
],
"responses": {
"ARGUMENT_DATA_TYPE_MISMATCH": {
"description": "A call attempt to a valid object and procedure was performed, however an argument value was provided with an unexpected data type, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_DATA_TYPE_MISMATCH\", \"Description\": \"Unable to process the request because the value provided on the \\u2018Enabled\\u2019 field is not a valid Boolean.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"ARGUMENT_NOT_FOUND": {
"description": "A call to a valid object and procedure was performed, however an unrecognized argument was provided, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_NOT_FOUND\", \"Description\": \"Unable to process the request because 'Enabled' is not a valid argument.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"ARGUMENT_REQUIRED_MISSING": {
"description": "A call to a valid object and procedure was performed, however a required argument was not provided, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_REQUIRED_MISSING\", \"Description\": \"Unable to process the request because the 'Enabled' field was not provided.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"ARGUMENT_VALUE_NOT_SUPPORTED": {
"description": "A call attempt to a valid object and procedure was performed, however a non-supported argument value was provided, therefore it was not possible to process the request.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"ARGUMENT_VALUE_NOT_SUPPORTED\", \"Description\": \"Unable to process the request because \\u2018Red\\u2019 is not a value supported by the \\u2018Colour\\u2019 field.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"METHOD_NOT_FOUND": {
"description": "A call to a valid object but non-existing procedure was performed, therefore it was not possible to process the request.",
"raised_by": "IPC Bus",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"METHOD_NOT_FOUND\", \"Description\": \"Unable to process the request because 'Set' is not a valid method\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OBJECT_NOT_FOUND": {
"description": "A call to a non-existing object was performed, therefore it was not possible to process the request.",
"raised_by": "IPC Bus",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OBJECT_NOT_FOUND\", \"Description\": \"Unable to process the request because 'prpl.Dummy' is not a valid object.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OK": {
"description": "A well-formed request to an authorized resource was performed, and the receiver was able to compute the response within the allowed time-window.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OK\"}}",
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Response"
},
{
"properties": {
"Body": {
"properties": {},
"required": []
}
}
}
]
}
}
}
},
"OPERATION_ALREADY_IN_PROGRESS": {
"description": "A well-formed request to an authorized resource was performed, however the operation could not be completed, as the required resource was temporarily locked by a different request in progress.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_ALREADY_IN_PROGRESS\", \"Description\": \"Unable to process the request because there is a duplicate operation currently in progress.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_ERROR": {
"description": "A well-formed request was performed however, it was not possible to process the request due to an unknown internal error.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_ERROR\", \"Description\": \"Unable to process the request because there is a configuration error.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_ILLEGAL": {
"description": "A well-formed request to an authorized resource was performed, however the operation could not be completed, as it was invoked in the incorrect system state or order.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_ILLEGAL\", \"Description\": \"Unable to process the request because the 'Stop' procedure can only be invoked after the 'Start' method has been called.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_PERMISSION_DENIED": {
"description": "A well-formed request was performed however, the client did not meet the security conditions required to access the protected resource, therefore it is not possible to process the request.",
"raised_by": "IPC Bus / Remote Protocol Adapter",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_PERMISSION_DENIED\", \"Description\": \"Unable to process the request because user \\u2018Admin\\u2019 does not have access privileges to invoke the \\u2018Set\\u2019 procedure on object \\u2018prpl.Dummy\\u2019.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
},
"OPERATION_TIMEOUT": {
"description": "A well-formed request was performed however, it was not possible to process the response within the allowed time-frame.",
"raised_by": "Micro-Service",
"content": {
"application/json": {
"example": "{\"Header\": {\"Name\": \"OPERATION_TIMEOUT\", \"Description\": \"The operation has been aborted because the service did not respond within the expected 5 seconds time-frame.\"}}",
"schema": {
"$ref": "#/components/schemas/Response"
}
}
}
}
},
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"Enabled": {
"type": "Boolean",
"description": "SMB Server administrative status.",
"format": "-",
"default_value": "the existing configuration",
"possible_values": "\"true\" or \"false\"",
"enum": [
"true",
"false"
],
"writeOnly": true
},
"Hostname": {
"type": "String",
"description": "SMB Server hostname.",
"format": "-",
"default_value": "the existing configuration",
"possible_values": "any string with length from 1 up to 64 chars",
"writeOnly": true
},
"Version": {
"type": "String",
"description": "SMB Server version or release number.",
"format": "-",
"default_value": "the existing configuration",
"possible_values": "\"1.0\", \"2.0\", \"3.0\", \"3.0.2\", \"3.1.1\"",
"writeOnly": true
}
},
"required": []
},
"example": "{\"Enabled\": true, \"Version\": \"3.1.1\", \"Hostname\": \"prplFoundation HGW\"}"
}
}
}
}
},
"components": {
"schemas": {
"ListRequest": {
"properties": {
"Limit": {
"description": "How many items to return at one time (max 200)",
"required": false,
"type": "integer",
"schema": {
"type": "integer",
"format": "int32",
"default": 20,
"example": {
"Limit": 10
}
}
},
"Offset": {
"description": "Which object index to start with",
"required": false,
"type": "integer",
"schema": {
"type": "integer",
"format": "int32",
"default": 0,
"example": {
"Offset": 45
}
}
}
}
},
"Response": {
"type": "object",
"description": "schema for a responses to object methods",
"oneOf": [
{
"properties": {
"Header": {
"type": "object",
"description": "Header object specifying the name of the response type and providing a detailed description in case of an error",
"properties": {
"Name": {
"type": "string",
"description": "name of the response type",
"enum": [
"OK"
]
}
},
"required": [
"Name"
],
"additionalProperties": false
},
"Body": {
"type": "object"
}
},
"additionalProperties": false
},
{
"properties": {
"Header": {
"type": "object",
"description": "Header object specifying the name of the response type and providing a detailed description in case of an error",
"properties": {
"Name": {
"type": "string",
"description": "name of the response type",
"enum": [
"OK",
"OPERATION_ALREADY_IN_PROGRESS",
"ARGUMENT_NOT_FOUND",
"ARGUMENT_DATA_TYPE_MISMATCH",
"OPERATION_TIMEOUT",
"METHOD_NOT_FOUND",
"OPERATION_ILLEGAL",
"OBJECT_NOT_FOUND",
"ARGUMENT_REQUIRED_MISSING",
"OPERATION_ERROR",
"ARGUMENT_VALUE_NOT_SUPPORTED",
"OPERATION_PERMISSION_DENIED"
]
},
"Description": {
"type": "string",
"description": "A more detailed error message. NOTE: only filled in when the operation returns an error."
}
},
"required": [
"Name",
"Description"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"Services.Local.Media.SMB": {
"description": "Services.Local.Media.SMB Object",
"id": "Services.Local.Media.SMB",
"type": "object",
"required": [],
"properties": {
"Enabled": {
"type": "Boolean",
"description": "SMB Server administrative status.",
"format": "-",
"default_value": "-",
"possible_values": "\"true\" or \"false\"",
"enum": [
"true",
"false"
]
},
"Hostname": {
"type": "String",
"description": "SMB Server hostname.",
"format": "-",
"default_value": "-",
"possible_values": "any string with length from 1 up to 64 chars"
},
"Status": {
"type": "String",
"description": "SMB Server operational status.",
"format": "-",
"default_value": "-",
"possible_values": "\"Active\", \"Disabled\", \"Error\"",
"readOnly": true
},
"Version": {
"type": "String",
"description": "SMB Server version or release number.",
"format": "-",
"default_value": "-",
"possible_values": "\"1.0\", \"2.0\", \"3.0\", \"3.0.2\", \"3.1.1\""
}
},
"events": {
"SERVICES_LOCAL_MEDIA_SMB_DISABLED": {
"content": {
"application/json": {
"example": ""
}
},
"description": "Raised when an existing SMB Server is disabled. This does not necessarily result from a configuration change of the administrative state field, but rather when it becomes operationally inactive or fails to start.",
"code": 1
},
"SERVICES_LOCAL_MEDIA_SMB_ENABLED": {
"content": {
"application/json": {
"example": ""
}
},
"description": "Raised when an existing SMB Server is enabled. This does not necessarily result from a configuration change of the administrative state field, but rather when it becomes operationally active.",
"code": 2
},
"SERVICES_LOCAL_MEDIA_SMB_MODIFIED": {
"content": {
"application/json": {
"example": ""
}
},
"description": "Raised when an existing SMB Server is modified. Updating the administrative state should also result in the event being triggered.",
"code": 3
},
"SERVICES_LOCAL_MEDIA_SMB_SHARE_ADDED": {
"content": {
"application/json": {
"example": "{\"ShareId\": \"Services.Local.Media.SMB.Shares.0\"}"
}
},
"description": "Raised when a new SMB Server Network Share is added.",
"code": 4
},
"SERVICES_LOCAL_MEDIA_SMB_SHARE_DELETED": {
"content": {
"application/json": {
"example": "{\"ShareId\": \"Services.Local.Media.SMB.Shares.0\"}"
}
},
"description": "Raised when an existing SMB Server Network Share is deleted.",
"code": 5
},
"SERVICES_LOCAL_MEDIA_SMB_SHARE_MODIFIED": {
"content": {
"application/json": {
"example": "{\"ShareId\": \"Services.Local.Media.SMB.Shares.0\"}"
}
},
"description": "Raised when an existing SMB Server Network Share configuration is modified. Updating the administrative state should also result in the event being triggered.",
"code": 6
}
},
"example": {},
"layer": 2
}
}
}
}