-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathssh.v1.0.6.openapi.json
490 lines (490 loc) · 16.6 KB
/
ssh.v1.0.6.openapi.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
{
"openapi" : "3.0.0",
"info" : {
"description" : "<p> The ctrlX SSH API provides functionalities to configure the SSH server. </p> <p>Usage:</p> <ul> <li>Click 'Authorize' to open the 'Available authorizations' dialog.</li> <li>Enter 'username' and 'password'. The 'Client credentials location' selector together with the 'client_id' and 'client_secret' fields as well as the 'Bearer' section can be ignored.</li> <li>Click 'Authorize' and then 'Close' to close the 'Available authorizations' dialog.</li> <li>Try out those GET, PUT, ... operations you're interested in.</li> </ul>",
"license" : {
"name" : "MIT"
},
"title" : "ctrlX OS - SSH API",
"version" : "1.0.6"
},
"servers" : [ {
"url" : "/ssh/api/v1"
}, {
"url" : "https://{host}/ssh/api/v1",
"variables" : {
"host" : {
"default" : "[fe80::dcad:beff:fe00:0001]",
"description" : "Hostname or ip address of the ctrlX OS system"
}
}
} ],
"security" : [ {
"UsernamePassword" : [ ]
}, {
"Bearer" : [ ]
} ],
"tags" : [ {
"description" : "Configure the SSH Server",
"name" : "SSH"
} ],
"paths" : {
"/status" : {
"get" : {
"operationId" : "getStatus",
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Status"
}
}
},
"description" : "Current status of the SSH protocol"
},
"401" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"403" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"500" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
}
},
"summary" : "Get current status of the SSH protocol",
"tags" : [ "SSH" ]
},
"put" : {
"operationId" : "setProtocolStatus",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Status"
}
}
}
},
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Status"
}
}
},
"description" : "Returns the successfully changed protocol"
},
"400" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "The request is incomplete or malformed"
},
"401" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"403" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"404" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "The resource was not found"
},
"500" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
}
},
"summary" : "Change status of the SSH protocol",
"tags" : [ "SSH" ]
}
},
"/configuration" : {
"get" : {
"operationId" : "getConfiguration",
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
},
"description" : "Current configuration of the SSH protocol"
},
"401" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"403" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"500" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
}
},
"summary" : "Get current configuration of the SSH protocol",
"tags" : [ "SSH" ]
},
"put" : {
"operationId" : "setProtocolConfiguration",
"requestBody" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
}
},
"responses" : {
"200" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Config"
}
}
},
"description" : "Returns the successfully changed protocol"
},
"400" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "The request is incomplete or malformed"
},
"401" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"403" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"404" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "The resource was not found"
},
"500" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
}
},
"summary" : "Change configuration of the SSH protocol",
"tags" : [ "SSH" ]
}
}
},
"components" : {
"responses" : {
"Unauthorized" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Not authorized to access this resource"
},
"Forbidden" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Access forbidden for this resource"
},
"BadRequest" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "The request is incomplete or malformed"
},
"InternalServerError" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "Something unexpected happened on the server"
},
"NotFound" : {
"content" : {
"application/json" : {
"schema" : {
"$ref" : "#/components/schemas/Problem"
}
}
},
"description" : "The resource was not found"
}
},
"schemas" : {
"Status" : {
"example" : {
"state" : "activated"
},
"properties" : {
"state" : {
"description" : "Represents the activation status of the ssh protocol",
"enum" : [ "activated", "deactivated" ],
"type" : "string"
}
},
"required" : [ "state" ],
"type" : "object"
},
"Config" : {
"example" : {
"clientAliveInterval" : 0,
"maxSessions" : 1,
"maxStartups" : 5,
"banner" : "banner",
"maxAuthTries" : 5,
"clientAliveCountMax" : 6
},
"properties" : {
"clientAliveInterval" : {
"description" : "Auto logout interval (in seconds) is calculated by clientAliveInterval * clientAliveCountMax",
"type" : "integer"
},
"clientAliveCountMax" : {
"description" : "Auto logout interval (in seconds) is calculated by clientAliveInterval * clientAliveCountMax",
"type" : "integer"
},
"maxSessions" : {
"description" : "Maximum number of open sessions per connection",
"type" : "integer"
},
"maxAuthTries" : {
"description" : "Maximum number of authentication attempts per connection",
"type" : "integer"
},
"maxStartups" : {
"description" : "Maximum number of concurrent unauthenticated connections",
"type" : "integer"
},
"banner" : {
"description" : "Login banner text",
"type" : "string"
}
},
"required" : [ "banner", "clientAliveCountMax", "clientAliveInterval", "maxAuthTries", "maxSessions", "maxStartups" ],
"type" : "object"
},
"Problem" : {
"description" : "This document defines a \"problem detail\" as a way to carry machine-readable details of errors in a HTTP response to avoid the need to define new error response formats for HTTP APIs.\n",
"properties" : {
"type" : {
"default" : "about:blank",
"description" : "A URI reference [RFC3986] that identifies the problem type. \nThis specification encourages that, when dereferenced, \nit provide human-readable documentation for the problem type \n(e.g., using HTML [W3C.REC-html5-20141028]). When this member \nis not present, its value is assumed to be \"about:blank\".\n",
"example" : "https://example.com/probs/out-of-credit",
"format" : "uri",
"type" : "string"
},
"title" : {
"description" : "A short, human-readable summary of the problem type. \nIt SHOULD NOT change from occurrence to occurrence of the problem, \nexcept for purposes of localization (e.g., using proactive content \nnegotiation; see [RFC7231], Section 3.4).\n",
"example" : "You do not have enough credit.",
"type" : "string"
},
"status" : {
"description" : "The HTTP status code ([RFC7231], Section 6) generated by the \norigin server for this occurrence of the problem.\n",
"example" : 403,
"format" : "int32",
"type" : "integer"
},
"detail" : {
"description" : "A human-readable explanation specific to this occurrence of the problem.\n",
"example" : "Your current balance is 30, but that costs 50.",
"type" : "string"
},
"instance" : {
"description" : "A URI reference that identifies the specific occurrence of the problem.\nIt may or may not yield further information if dereferenced.\n",
"example" : "/account/12345/msgs/abc",
"type" : "string"
},
"code" : {
"deprecated" : true,
"description" : "An error code issued by the system that caused the original problem.\nThis code can be used to track down the root cause of the error.\n",
"example" : "F360001",
"type" : "string"
},
"mainDiagnosisCode" : {
"description" : "The main diagnosis code is issued by the system that caused the problem.\nThis code can be used to track down the root cause and source of the error.\nIt can be used to search in the documentation for a solution.\nIt SHOULD NOT change from occurrence to occurrence of the same problem.\n",
"example" : "080F0100",
"type" : "string"
},
"detailedDiagnosisCode" : {
"description" : "The detailed diagnosis code issued by the system that caused the problem.\nThis code can be used to track down the detailed cause and source of the error.\nIt can be used to search in the documentation for a solution.\nThe detailed diagnosis code gives additional information about the cause of the error.\nIt SHOULD NOT change from occurrence to occurrence of the same problem.\n",
"example" : "00666001",
"type" : "string"
},
"dynamicDescription" : {
"description" : "A dynamic description gives detailed information about the occurrence of a problem.\nIt can change between different occurrences of the same error.\n",
"example" : "value = -4.5",
"type" : "string"
},
"severity" : {
"description" : " Severity of a problem as defined RFC5424 of the Syslog standard, see https://tools.ietf.org/html/rfc5424",
"enum" : [ "Emergency", "Alert", "Critical", "Error", "Warning", "Notice", "Informational", "Debug" ],
"example" : "Error",
"type" : "string"
},
"links" : {
"description" : "Collection of links to fix the problem. E.g. links to online user manual,\nto an online community (using tags) or a developer chat (e.g. Slack).\n",
"items" : {
"example" : "https://stackoverflow.com/questions/tagged/boschrexroth+controlx+f360001",
"format" : "uri",
"type" : "string"
},
"type" : "array"
},
"moreInfo" : {
"additionalProperties" : true,
"example" : {
"trace" : "ExampleClass.cpp#452 Null pointer exception",
"class" : "ExampleClass"
},
"type" : "object"
}
},
"required" : [ "title", "type" ],
"type" : "object",
"x-version" : "1.0.0"
}
},
"securitySchemes" : {
"UsernamePassword" : {
"description" : "Enter username and password",
"flows" : {
"password" : {
"scopes" : {
"dummy" : "Dummy scope (scopes not used)"
},
"tokenUrl" : "/identity-manager/api/v2/auth/token"
}
},
"type" : "oauth2"
},
"Bearer" : {
"description" : "Alternatively: Enter bearer token (without prefix 'Bearer')",
"scheme" : "bearer",
"type" : "http"
}
}
}
}