1 | swagger: '2.0' |
---|
2 | |
---|
3 | info: |
---|
4 | version: "1.1.0" |
---|
5 | title: OpenGnsys REST API definition |
---|
6 | description: | |
---|
7 | Information about the OpenGnsys REST API functions (including Server and |
---|
8 | Repository Manager). |
---|
9 | contact: |
---|
10 | name: OpenGnsys Project |
---|
11 | url: http://opengnsys.es/ |
---|
12 | license: |
---|
13 | name: Creative Commons 4.0 International |
---|
14 | url: http://creativecommons.org/licenses/by/4.0/ |
---|
15 | basePath: /opengnsys/rest |
---|
16 | schemes: |
---|
17 | - https |
---|
18 | consumes: |
---|
19 | - application/json |
---|
20 | produces: |
---|
21 | - application/json |
---|
22 | securityDefinitions: |
---|
23 | apikey: |
---|
24 | type: apiKey |
---|
25 | name: Authorization |
---|
26 | in: header |
---|
27 | # Paths description. |
---|
28 | paths: |
---|
29 | /login: |
---|
30 | post: |
---|
31 | description: Check user login and returns his/her API key. |
---|
32 | parameters: |
---|
33 | - in: body |
---|
34 | name: authdata |
---|
35 | description: JSON authentication data |
---|
36 | required: true |
---|
37 | schema: |
---|
38 | type: object |
---|
39 | properties: |
---|
40 | username: |
---|
41 | type: string |
---|
42 | password: |
---|
43 | type: string |
---|
44 | format: password |
---|
45 | responses: |
---|
46 | "200": |
---|
47 | description: Successful login |
---|
48 | schema: |
---|
49 | type: object |
---|
50 | properties: |
---|
51 | userid: |
---|
52 | type: integer |
---|
53 | description: user identificator |
---|
54 | format: int32 |
---|
55 | apikey: |
---|
56 | description: API key to include in ``Authorization`` header |
---|
57 | type: string |
---|
58 | "400": |
---|
59 | description: Missing parameters |
---|
60 | "500": |
---|
61 | description: Authentication error |
---|
62 | tags: |
---|
63 | - server |
---|
64 | - user |
---|
65 | /info: |
---|
66 | get: |
---|
67 | description: Gets OpenGnsys Server information |
---|
68 | responses: |
---|
69 | "200": |
---|
70 | description: Successful response |
---|
71 | schema: |
---|
72 | type: object |
---|
73 | properties: |
---|
74 | project: |
---|
75 | description: project name (OpenGnsys) |
---|
76 | type: string |
---|
77 | version: |
---|
78 | description: project version |
---|
79 | type: string |
---|
80 | release: |
---|
81 | description: project release |
---|
82 | type: string |
---|
83 | services: |
---|
84 | description: actived services |
---|
85 | type: array |
---|
86 | items: |
---|
87 | type: string |
---|
88 | enum: [ 'server', 'repository', 'tracker' ] |
---|
89 | required: [ project, version, release, services ] |
---|
90 | tags: |
---|
91 | - server |
---|
92 | - repository |
---|
93 | /status: |
---|
94 | get: |
---|
95 | description: Gets OpenGnsys Server status information |
---|
96 | responses: |
---|
97 | "200": |
---|
98 | description: Successful response |
---|
99 | schema: |
---|
100 | type: object |
---|
101 | properties: |
---|
102 | memInfo: |
---|
103 | description: memory information |
---|
104 | properties: |
---|
105 | total: |
---|
106 | description: total amount of memory |
---|
107 | type: integer |
---|
108 | format: int64 |
---|
109 | used: |
---|
110 | description: amount of used memory |
---|
111 | type: integer |
---|
112 | format: int64 |
---|
113 | required: [ total, used ] |
---|
114 | cpu: |
---|
115 | description: CPU information |
---|
116 | properties: |
---|
117 | model: |
---|
118 | description: processor model |
---|
119 | type: string |
---|
120 | usage: |
---|
121 | description: average of processor load |
---|
122 | type: number |
---|
123 | format: float |
---|
124 | required: [ model, usage ] |
---|
125 | required: [ memInfo, cpu ] |
---|
126 | tags: |
---|
127 | - server |
---|
128 | /ous: |
---|
129 | get: |
---|
130 | description: Gets all `OU` objects. |
---|
131 | responses: |
---|
132 | "200": |
---|
133 | description: Successful response |
---|
134 | schema: |
---|
135 | type: array |
---|
136 | items: |
---|
137 | type: object |
---|
138 | properties: |
---|
139 | id: |
---|
140 | type: integer |
---|
141 | description: Organization Unit identificator |
---|
142 | format: int32 |
---|
143 | minimum: 1 |
---|
144 | name: |
---|
145 | type: string |
---|
146 | description: Organization Unit name |
---|
147 | required: [ id, name ] |
---|
148 | tags: |
---|
149 | - server |
---|
150 | - ou |
---|
151 | /ous/{ouid}: |
---|
152 | get: |
---|
153 | description: Get an `OU` object. |
---|
154 | parameters: |
---|
155 | - name: ouid |
---|
156 | in: path |
---|
157 | description: Organization Unit identificator |
---|
158 | required: true |
---|
159 | type: integer |
---|
160 | responses: |
---|
161 | "200": |
---|
162 | description: Successful response |
---|
163 | schema: |
---|
164 | type: object |
---|
165 | properties: |
---|
166 | id: |
---|
167 | type: integer |
---|
168 | description: OU identificator |
---|
169 | name: |
---|
170 | type: string |
---|
171 | description: OU name |
---|
172 | description: |
---|
173 | type: string |
---|
174 | description: OU description |
---|
175 | required: [ id, name, description ] |
---|
176 | security: |
---|
177 | - apikey: [] |
---|
178 | tags: |
---|
179 | - server |
---|
180 | - ou |
---|
181 | /ous/{ouid}/groups: |
---|
182 | get: |
---|
183 | description: Get all group of labs defined in an `OU` object. |
---|
184 | parameters: |
---|
185 | - name: ouid |
---|
186 | in: path |
---|
187 | description: Organization Unit identificator |
---|
188 | required: true |
---|
189 | type: integer |
---|
190 | responses: |
---|
191 | "200": |
---|
192 | description: Successful response |
---|
193 | schema: |
---|
194 | type: array |
---|
195 | items: |
---|
196 | type: object |
---|
197 | properties: |
---|
198 | id: |
---|
199 | description: group identificator |
---|
200 | type: integer |
---|
201 | format: int32 |
---|
202 | name: |
---|
203 | description: group name |
---|
204 | type: string |
---|
205 | type: |
---|
206 | description: group type |
---|
207 | type: integer |
---|
208 | comments: |
---|
209 | description: extra comments |
---|
210 | type: string |
---|
211 | parent: |
---|
212 | description: parent group |
---|
213 | type: object |
---|
214 | properties: |
---|
215 | id: |
---|
216 | description: parent group identificator |
---|
217 | type: integer |
---|
218 | format: int32 |
---|
219 | required: [ id, name, comments ] |
---|
220 | security: |
---|
221 | - apikey: [] |
---|
222 | tags: |
---|
223 | - server |
---|
224 | - ou |
---|
225 | /ous/{ouid}/labs: |
---|
226 | get: |
---|
227 | description: Get all `lab` objects defined in an `OU`. |
---|
228 | parameters: |
---|
229 | - name: ouid |
---|
230 | in: path |
---|
231 | description: OU identificator |
---|
232 | required: true |
---|
233 | type: integer |
---|
234 | responses: |
---|
235 | "200": |
---|
236 | description: Successful response |
---|
237 | schema: |
---|
238 | type: array |
---|
239 | items: |
---|
240 | type: object |
---|
241 | properties: |
---|
242 | id: |
---|
243 | type: integer |
---|
244 | description: laboratory identificator |
---|
245 | format: int32 |
---|
246 | name: |
---|
247 | type: string |
---|
248 | description: laboratory name |
---|
249 | inremotepc: |
---|
250 | type: boolean |
---|
251 | description: laboratory usable in Remote PC Project flag |
---|
252 | group: |
---|
253 | type: object |
---|
254 | properties: |
---|
255 | id: |
---|
256 | description: group identificator |
---|
257 | type: integer |
---|
258 | format: int32 |
---|
259 | ou: |
---|
260 | type: object |
---|
261 | properties: |
---|
262 | id: |
---|
263 | description: OU identificator |
---|
264 | type: integer |
---|
265 | format: int32 |
---|
266 | required: [ id, name; inremotepc, ou ] |
---|
267 | security: |
---|
268 | - apikey: [] |
---|
269 | tags: |
---|
270 | - server |
---|
271 | - lab |
---|
272 | /ous/{ouid}/labs/{labid}: |
---|
273 | get: |
---|
274 | description: Get a `lab` object. |
---|
275 | parameters: |
---|
276 | - name: ouid |
---|
277 | in: path |
---|
278 | description: OU identificator |
---|
279 | required: true |
---|
280 | type: integer |
---|
281 | - name: labid |
---|
282 | in: path |
---|
283 | description: laboratory identificator |
---|
284 | required: true |
---|
285 | type: integer |
---|
286 | responses: |
---|
287 | "200": |
---|
288 | description: Successful response |
---|
289 | schema: |
---|
290 | type: object |
---|
291 | properties: |
---|
292 | id: |
---|
293 | description: laboratory identificator |
---|
294 | type: integer |
---|
295 | format: int32 |
---|
296 | name: |
---|
297 | description: laboratory name |
---|
298 | type: string |
---|
299 | location: |
---|
300 | description: laboratory location |
---|
301 | type: string |
---|
302 | description: |
---|
303 | description: laboratory description |
---|
304 | type: string |
---|
305 | inremotepc: |
---|
306 | description: check if this lab can be included in Remote PC Project |
---|
307 | type: boolean |
---|
308 | capacity: |
---|
309 | description: maximum number of people in the lab |
---|
310 | type: integer |
---|
311 | format: int32 |
---|
312 | defclients: |
---|
313 | description: number of defined clients in the lab |
---|
314 | type: integer |
---|
315 | format: int32 |
---|
316 | projector: |
---|
317 | description: check if this lab has a projector |
---|
318 | type: boolean |
---|
319 | board: |
---|
320 | description: check if this lab has an electronic board |
---|
321 | type: boolean |
---|
322 | routerip: |
---|
323 | description: lab router IP address |
---|
324 | type: string |
---|
325 | netmask: |
---|
326 | description: network mask to use in the lab |
---|
327 | type: string |
---|
328 | ntp: |
---|
329 | description: NTP server IP address |
---|
330 | type: string |
---|
331 | dns: |
---|
332 | description: DNS server IP address |
---|
333 | type: string |
---|
334 | proxyurl: |
---|
335 | description: Proxy server URL |
---|
336 | type: string |
---|
337 | mcastmode: |
---|
338 | description: Multicast protocol mode (full-duplex, half-duplex). |
---|
339 | type: string |
---|
340 | enum: [ "full-duplex", "half-duplex" ] |
---|
341 | default: "full-duplex" |
---|
342 | mcastip: |
---|
343 | description: Multicast IP address |
---|
344 | type: string |
---|
345 | mcastport: |
---|
346 | description: Multicast port |
---|
347 | type: integer |
---|
348 | format: int32 |
---|
349 | mcastspeed: |
---|
350 | description: Multicast speed (in Mbps) |
---|
351 | type: integer |
---|
352 | format: int32 |
---|
353 | p2pmode: |
---|
354 | description: Bittorrent connection type ("peer", "leecher". "seeder"). |
---|
355 | type: string |
---|
356 | p2ptime: |
---|
357 | description: Bittorrent connection extra time (in s.) |
---|
358 | type: integer |
---|
359 | format: int32 |
---|
360 | image: |
---|
361 | description: Lab's picture file |
---|
362 | type: string |
---|
363 | required: [ id, name, location, description, inremotepc, capacity, defclients, projector, board, routerip, netmask, modomul, mcastip, mcastport, mcastspeed, p2pmode, p2ptime, image ] |
---|
364 | security: |
---|
365 | - apikey: [] |
---|
366 | tags: |
---|
367 | - server |
---|
368 | - lab |
---|
369 | /ous/{ouid}/labs/{labid}/clients: |
---|
370 | get: |
---|
371 | description: Get all `client` objects defined in an `lab`. |
---|
372 | parameters: |
---|
373 | - name: ouid |
---|
374 | in: path |
---|
375 | description: OU identificator |
---|
376 | required: true |
---|
377 | type: integer |
---|
378 | - name: labid |
---|
379 | in: path |
---|
380 | description: Lab identificator |
---|
381 | required: true |
---|
382 | type: integer |
---|
383 | responses: |
---|
384 | "200": |
---|
385 | description: Successful response |
---|
386 | schema: |
---|
387 | type: array |
---|
388 | items: |
---|
389 | type: object |
---|
390 | properties: |
---|
391 | id: |
---|
392 | description: client identificator |
---|
393 | type: integer |
---|
394 | format: int32 |
---|
395 | name: |
---|
396 | description: client name |
---|
397 | type: string |
---|
398 | ip: |
---|
399 | description: client IP address |
---|
400 | type: string |
---|
401 | mac: |
---|
402 | description: client MAC (Ethernet) address |
---|
403 | type: string |
---|
404 | ou: |
---|
405 | type: object |
---|
406 | properties: |
---|
407 | id: |
---|
408 | type: integer |
---|
409 | format: int32 |
---|
410 | lab: |
---|
411 | type: object |
---|
412 | properties: |
---|
413 | id: |
---|
414 | type: integer |
---|
415 | format: int32 |
---|
416 | required: [ id, name, ip, mac, ou, lab ] |
---|
417 | security: |
---|
418 | - apikey: [] |
---|
419 | tags: |
---|
420 | - server |
---|
421 | - client |
---|
422 | /ous/{ouid}/labs/{labid}/clients/{clientid}: |
---|
423 | get: |
---|
424 | description: Get a `client` object. |
---|
425 | parameters: |
---|
426 | - name: ouid |
---|
427 | in: path |
---|
428 | description: OU identificator |
---|
429 | required: true |
---|
430 | type: integer |
---|
431 | - name: labid |
---|
432 | in: path |
---|
433 | description: Lab identificator |
---|
434 | required: true |
---|
435 | type: integer |
---|
436 | - name: clientid |
---|
437 | in: path |
---|
438 | description: Client identificator |
---|
439 | required: true |
---|
440 | type: integer |
---|
441 | responses: |
---|
442 | "200": |
---|
443 | description: Successful response |
---|
444 | schema: |
---|
445 | type: object |
---|
446 | properties: |
---|
447 | id: |
---|
448 | description: client id |
---|
449 | type: integer |
---|
450 | format: int32 |
---|
451 | name: |
---|
452 | description: client name |
---|
453 | type: string |
---|
454 | serialno: |
---|
455 | description: client serial number |
---|
456 | type: string |
---|
457 | netiface: |
---|
458 | description: main network interface |
---|
459 | type: string |
---|
460 | netdriver: |
---|
461 | description: client MAC address (kernel module) |
---|
462 | type: string |
---|
463 | mac: |
---|
464 | description: client MAC address |
---|
465 | type: string |
---|
466 | ip: |
---|
467 | description: client IP address |
---|
468 | type: string |
---|
469 | netmask: |
---|
470 | description: subnet mask address |
---|
471 | type: string |
---|
472 | routerip: |
---|
473 | description: network router IP address |
---|
474 | type: string |
---|
475 | repo: |
---|
476 | description: repository identification |
---|
477 | type: object |
---|
478 | properties: |
---|
479 | id: |
---|
480 | type: integer |
---|
481 | format: int32 |
---|
482 | validation: |
---|
483 | description: boot validation flag |
---|
484 | type: boolean |
---|
485 | boottype: |
---|
486 | description: boot template type |
---|
487 | type: string |
---|
488 | image: |
---|
489 | description: client's picture file |
---|
490 | type: string |
---|
491 | required: [ id, name, serialno, netiface, netdriver, mac, ip, netmask, routerip, repo, validation, image ] |
---|
492 | security: |
---|
493 | - apikey: [] |
---|
494 | tags: |
---|
495 | - server |
---|
496 | - client |
---|
497 | /ous/{ouid}/labs/{labid}/clients/{clientid}/hardware: |
---|
498 | get: |
---|
499 | description: Get the hardware definition of a `client` object. |
---|
500 | parameters: |
---|
501 | - name: ouid |
---|
502 | in: path |
---|
503 | description: OU identificator |
---|
504 | required: true |
---|
505 | type: integer |
---|
506 | - name: labid |
---|
507 | in: path |
---|
508 | description: Lab identificator |
---|
509 | required: true |
---|
510 | type: integer |
---|
511 | - name: clientid |
---|
512 | in: path |
---|
513 | description: Client identificator |
---|
514 | required: true |
---|
515 | type: integer |
---|
516 | responses: |
---|
517 | "200": |
---|
518 | description: Successful response |
---|
519 | schema: |
---|
520 | type: object |
---|
521 | properties: |
---|
522 | id: |
---|
523 | description: client id |
---|
524 | type: integer |
---|
525 | format: int32 |
---|
526 | name: |
---|
527 | description: client name |
---|
528 | type: string |
---|
529 | hardware: |
---|
530 | description: hardware components |
---|
531 | type: array |
---|
532 | items: |
---|
533 | type: object |
---|
534 | properties: |
---|
535 | type: |
---|
536 | description: hardware component type |
---|
537 | type: string |
---|
538 | description: |
---|
539 | description: hardware component description |
---|
540 | type: string |
---|
541 | required: [ type, description ] |
---|
542 | required: [ id, name, hardware ] |
---|
543 | security: |
---|
544 | - apikey: [] |
---|
545 | tags: |
---|
546 | - server |
---|
547 | - client |
---|
548 | /ous/{ouid}/labs/{labid}/clients/{clientid}/diskcfg: |
---|
549 | get: |
---|
550 | description: Get disks configuration of a `client` |
---|
551 | parameters: |
---|
552 | - name: ouid |
---|
553 | in: path |
---|
554 | description: OU identificator |
---|
555 | required: true |
---|
556 | type: integer |
---|
557 | - name: labid |
---|
558 | in: path |
---|
559 | description: Lab identificator |
---|
560 | required: true |
---|
561 | type: integer |
---|
562 | - name: clientid |
---|
563 | in: path |
---|
564 | description: Client identificator |
---|
565 | required: true |
---|
566 | type: integer |
---|
567 | responses: |
---|
568 | "200": |
---|
569 | description: Successful response |
---|
570 | schema: |
---|
571 | type: object |
---|
572 | properties: |
---|
573 | id: |
---|
574 | description: client id |
---|
575 | type: integer |
---|
576 | format: int32 |
---|
577 | name: |
---|
578 | description: client name |
---|
579 | type: string |
---|
580 | diskcfg: |
---|
581 | description: | |
---|
582 | array of disk configuration data, including general disk information and |
---|
583 | partition/filesystem information (if not specified in paratmeter |
---|
584 | description, it is only valid in partition configuration). |
---|
585 | type: array |
---|
586 | items: |
---|
587 | type: object |
---|
588 | properties: |
---|
589 | disk: |
---|
590 | description: disk number (only for disks configurations) |
---|
591 | type: integer |
---|
592 | format: int32 |
---|
593 | parttable: |
---|
594 | description: partition table type (only for disks configurations) |
---|
595 | type: string |
---|
596 | enum: [ "MSDOS", "GPT", "LVM", "ZVOL" ] |
---|
597 | partition: |
---|
598 | description: partition number |
---|
599 | type: integer |
---|
600 | format: int32 |
---|
601 | minimum: 1 |
---|
602 | parttype: |
---|
603 | description: partition type |
---|
604 | type: string |
---|
605 | size: |
---|
606 | description: disk size (used in both, disk and partition configuration) |
---|
607 | type: integer |
---|
608 | format: int64 |
---|
609 | filesystem: |
---|
610 | description: filesystem type |
---|
611 | type: string |
---|
612 | usage: |
---|
613 | description: data usage percentage in a formated filesystem |
---|
614 | type: integer |
---|
615 | format: int32 |
---|
616 | os: |
---|
617 | description: installed operating system |
---|
618 | type: string |
---|
619 | image: |
---|
620 | description: restaured image data (if needed) |
---|
621 | type: object |
---|
622 | properties: |
---|
623 | id: |
---|
624 | type: integer |
---|
625 | format: int32 |
---|
626 | deploydate: |
---|
627 | description: image restauration/deploying date |
---|
628 | type: string |
---|
629 | format: date-time |
---|
630 | updated: |
---|
631 | description: flag to check if the restaured image is updated |
---|
632 | type: boolean |
---|
633 | required: [ id, name, diskcfg ] |
---|
634 | security: |
---|
635 | - apikey: [] |
---|
636 | tags: |
---|
637 | - server |
---|
638 | - client |
---|
639 | /ous/{ouid}/labs/{labid}/clients/{clientid}/status: |
---|
640 | get: |
---|
641 | description: Get execution status of a `client` |
---|
642 | parameters: |
---|
643 | - name: ouid |
---|
644 | in: path |
---|
645 | description: OU identificator |
---|
646 | required: true |
---|
647 | type: integer |
---|
648 | - name: labid |
---|
649 | in: path |
---|
650 | description: Lab identificator |
---|
651 | required: true |
---|
652 | type: integer |
---|
653 | - name: clientid |
---|
654 | in: path |
---|
655 | description: Client identificator |
---|
656 | required: true |
---|
657 | type: integer |
---|
658 | responses: |
---|
659 | "200": |
---|
660 | description: Successful response |
---|
661 | schema: |
---|
662 | type: object |
---|
663 | properties: |
---|
664 | id: |
---|
665 | description: client id |
---|
666 | type: integer |
---|
667 | format: int32 |
---|
668 | ip: |
---|
669 | description: client IP address |
---|
670 | type: string |
---|
671 | status: |
---|
672 | description: execution status |
---|
673 | type: string |
---|
674 | enum: [ "nodata", "off", "ogclient", "busy", "linux", "windows", "unknown" ] |
---|
675 | loggedin: |
---|
676 | description: flag to check if an user is logged in |
---|
677 | type: boolean |
---|
678 | required: [ id, ip, status, loggedin ] |
---|
679 | security: |
---|
680 | - apikey: [] |
---|
681 | tags: |
---|
682 | - server |
---|
683 | - client |
---|
684 | /ous/{ouid}/repos: |
---|
685 | get: |
---|
686 | description: Get all `repo` objects defined in an `OU`. |
---|
687 | parameters: |
---|
688 | - name: ouid |
---|
689 | in: path |
---|
690 | description: OU identificator |
---|
691 | required: true |
---|
692 | type: integer |
---|
693 | responses: |
---|
694 | "200": |
---|
695 | description: Successful response |
---|
696 | schema: |
---|
697 | type: array |
---|
698 | items: |
---|
699 | type: object |
---|
700 | properties: |
---|
701 | id: |
---|
702 | type: integer |
---|
703 | format: int32 |
---|
704 | name: |
---|
705 | type: string |
---|
706 | ou: |
---|
707 | type: object |
---|
708 | properties: |
---|
709 | id: |
---|
710 | type: integer |
---|
711 | format: int32 |
---|
712 | required: [ id, name, ou ] |
---|
713 | security: |
---|
714 | - apikey: [] |
---|
715 | tags: |
---|
716 | - server |
---|
717 | - repo |
---|
718 | /ous/{ouid}/repos/{repoid}: |
---|
719 | get: |
---|
720 | description: Get a `repo` object. |
---|
721 | parameters: |
---|
722 | - name: ouid |
---|
723 | in: path |
---|
724 | description: OU identificator |
---|
725 | required: true |
---|
726 | type: integer |
---|
727 | - name: repoid |
---|
728 | in: path |
---|
729 | description: repository identificator |
---|
730 | required: true |
---|
731 | type: integer |
---|
732 | responses: |
---|
733 | "200": |
---|
734 | description: Successful response |
---|
735 | schema: |
---|
736 | type: object |
---|
737 | properties: |
---|
738 | id: |
---|
739 | description: repository id |
---|
740 | type: integer |
---|
741 | format: int32 |
---|
742 | name: |
---|
743 | description: repository name |
---|
744 | type: string |
---|
745 | description: |
---|
746 | description: repository description |
---|
747 | type: string |
---|
748 | ip: |
---|
749 | description: repository IP address |
---|
750 | type: string |
---|
751 | required: [ id, name, description, ip ] |
---|
752 | security: |
---|
753 | - apikey: [] |
---|
754 | tags: |
---|
755 | - server |
---|
756 | - repo |
---|
757 | /ous/{ouid}/images: |
---|
758 | get: |
---|
759 | description: Get all `image` objects defined in an `OU`. |
---|
760 | parameters: |
---|
761 | - name: ouid |
---|
762 | in: path |
---|
763 | description: OU identificator |
---|
764 | required: true |
---|
765 | type: integer |
---|
766 | responses: |
---|
767 | "200": |
---|
768 | description: Successful response |
---|
769 | schema: |
---|
770 | type: array |
---|
771 | items: |
---|
772 | type: object |
---|
773 | properties: |
---|
774 | id: |
---|
775 | type: integer |
---|
776 | format: int32 |
---|
777 | name: |
---|
778 | type: string |
---|
779 | inremotepc: |
---|
780 | type: boolean |
---|
781 | ou: |
---|
782 | type: object |
---|
783 | properties: |
---|
784 | id: |
---|
785 | type: integer |
---|
786 | format: int32 |
---|
787 | required: [ id, name, inremotepc, ou ] |
---|
788 | security: |
---|
789 | - apikey: [] |
---|
790 | tags: |
---|
791 | - server |
---|
792 | - image |
---|
793 | /ous/{ouid}/images/{imageid}: |
---|
794 | get: |
---|
795 | description: Get an `image` object. |
---|
796 | parameters: |
---|
797 | - name: ouid |
---|
798 | in: path |
---|
799 | description: OU identificator |
---|
800 | required: true |
---|
801 | type: integer |
---|
802 | - name: imageid |
---|
803 | in: path |
---|
804 | description: image definition identificator |
---|
805 | required: true |
---|
806 | type: integer |
---|
807 | responses: |
---|
808 | "200": |
---|
809 | description: Successful response |
---|
810 | schema: |
---|
811 | type: object |
---|
812 | properties: |
---|
813 | id: |
---|
814 | description: image id |
---|
815 | type: integer |
---|
816 | format: int32 |
---|
817 | name: |
---|
818 | description: image name |
---|
819 | type: string |
---|
820 | description: |
---|
821 | description: image description |
---|
822 | type: string |
---|
823 | comments: |
---|
824 | description: extra comments |
---|
825 | type: string |
---|
826 | inremotepc: |
---|
827 | description: image usable in Remote PC Project flag |
---|
828 | type: boolean |
---|
829 | repo: |
---|
830 | description: repository identification |
---|
831 | type: object |
---|
832 | properties: |
---|
833 | id: |
---|
834 | type: integer |
---|
835 | format: int32 |
---|
836 | type: |
---|
837 | description: image type (``monolithic``, ``basic``, ``incremental``) |
---|
838 | type: string |
---|
839 | baseimg: |
---|
840 | description: base image for an incremental image (if ``type`` is ``incremental``) |
---|
841 | type: string |
---|
842 | path: |
---|
843 | description: image path (if ``type`` is ``incremental``) |
---|
844 | type: string |
---|
845 | client: |
---|
846 | description: model client's data |
---|
847 | type: object |
---|
848 | properties: |
---|
849 | id: |
---|
850 | description: model client's id. |
---|
851 | type: integer |
---|
852 | format: int32 |
---|
853 | disk: |
---|
854 | description: source disk number |
---|
855 | type: integer |
---|
856 | format: int32 |
---|
857 | partition: |
---|
858 | description: source partition number |
---|
859 | type: integer |
---|
860 | format: int32 |
---|
861 | required: [ id, disk, partition ] |
---|
862 | creationdate: |
---|
863 | description: image creation date |
---|
864 | type: string |
---|
865 | format: date-time |
---|
866 | release: |
---|
867 | description: image creation release |
---|
868 | type: string |
---|
869 | required: [ id, name, description, comments, inremotepc, repo, type ] |
---|
870 | security: |
---|
871 | - apikey: [] |
---|
872 | tags: |
---|
873 | - server |
---|
874 | - image |
---|
875 | /ous/{ouid}/images/{imageid}/software: |
---|
876 | get: |
---|
877 | description: Get software inventory store into an `image` |
---|
878 | parameters: |
---|
879 | - name: ouid |
---|
880 | in: path |
---|
881 | description: OU identificator |
---|
882 | required: true |
---|
883 | type: integer |
---|
884 | - name: imageid |
---|
885 | in: path |
---|
886 | description: image definition identificator |
---|
887 | required: true |
---|
888 | type: integer |
---|
889 | responses: |
---|
890 | "200": |
---|
891 | description: Successful response |
---|
892 | schema: |
---|
893 | type: object |
---|
894 | properties: |
---|
895 | id: |
---|
896 | description: image id |
---|
897 | type: integer |
---|
898 | format: int32 |
---|
899 | name: |
---|
900 | description: image name |
---|
901 | type: string |
---|
902 | os: |
---|
903 | description: installed operating system |
---|
904 | type: string |
---|
905 | software: |
---|
906 | description: array of installed applications |
---|
907 | type: array |
---|
908 | items: |
---|
909 | type: object |
---|
910 | properties: |
---|
911 | application: |
---|
912 | description: application name and version |
---|
913 | type: string |
---|
914 | required: [ id, name, os, software ] |
---|
915 | security: |
---|
916 | - apikey: [] |
---|
917 | tags: |
---|
918 | - server |
---|
919 | - image |
---|
920 | #/ous/{ouid}/images/{imageid}/boot: |
---|
921 | /repository/images |
---|
922 | get: |
---|
923 | description: Get information about images stored in a repository |
---|
924 | responses: |
---|
925 | "200": |
---|
926 | description: Successful response |
---|
927 | schema: |
---|
928 | type: object |
---|
929 | properties: |
---|
930 | disk: |
---|
931 | description: repository disk information |
---|
932 | type: object |
---|
933 | properties: |
---|
934 | total: |
---|
935 | description: total disk space |
---|
936 | type: string |
---|
937 | used: |
---|
938 | description: disk space used by files |
---|
939 | type: string |
---|
940 | free: |
---|
941 | description: amount of free disk space |
---|
942 | type: string |
---|
943 | percent: |
---|
944 | description: percentage of used space |
---|
945 | type: string |
---|
946 | required: [ total, used, free, percent ] |
---|
947 | images: |
---|
948 | description: information about stored images |
---|
949 | type: object |
---|
950 | properties: |
---|
951 | file: |
---|
952 | description: image file information |
---|
953 | type: object |
---|
954 | properties: |
---|
955 | required: [ total, used, free, percent ] |
---|
956 | name: |
---|
957 | description: file name |
---|
958 | type: string |
---|
959 | size: |
---|
960 | description: file size (bytes) |
---|
961 | type: integer |
---|
962 | format: int64 |
---|
963 | modified: |
---|
964 | description: file modification date |
---|
965 | type: string |
---|
966 | format: date-time |
---|
967 | permissions: |
---|
968 | description: file permissions |
---|
969 | type: string |
---|
970 | required: [ name, size, modified, permissions ] |
---|
971 | required: [ disk, images ] |
---|
972 | security: |
---|
973 | - apikey: [] |
---|
974 | tags: |
---|
975 | - repository |
---|
976 | - image |
---|
977 | #/repository/poweron |
---|
978 | /ogagent/started: |
---|
979 | post: |
---|
980 | description: Process push notification when OGAgent is started |
---|
981 | parameters: |
---|
982 | - in: body |
---|
983 | name: data |
---|
984 | description: Operation data |
---|
985 | required: true |
---|
986 | schema: |
---|
987 | type: object |
---|
988 | properties: |
---|
989 | ip: |
---|
990 | type: string |
---|
991 | mac: |
---|
992 | type: string |
---|
993 | ostype: |
---|
994 | type: string |
---|
995 | osversion: |
---|
996 | type: string |
---|
997 | secret: |
---|
998 | type: string |
---|
999 | responses: |
---|
1000 | "200": |
---|
1001 | description: Successful operation |
---|
1002 | "400": |
---|
1003 | description: An error has occurred |
---|
1004 | tags: |
---|
1005 | - server |
---|
1006 | - agent |
---|
1007 | /ogagent/stopped: |
---|
1008 | post: |
---|
1009 | description: Process push notification when OGAgent is stopped |
---|
1010 | parameters: |
---|
1011 | - in: body |
---|
1012 | name: data |
---|
1013 | description: Operation data |
---|
1014 | required: true |
---|
1015 | schema: |
---|
1016 | type: object |
---|
1017 | properties: |
---|
1018 | ip: |
---|
1019 | type: string |
---|
1020 | mac: |
---|
1021 | type: string |
---|
1022 | ostype: |
---|
1023 | type: string |
---|
1024 | osversion: |
---|
1025 | type: string |
---|
1026 | responses: |
---|
1027 | "200": |
---|
1028 | description: Successful operation |
---|
1029 | "400": |
---|
1030 | description: An error has occurred |
---|
1031 | tags: |
---|
1032 | - server |
---|
1033 | - agent |
---|
1034 | /ogagent/loggedin: |
---|
1035 | post: |
---|
1036 | description: Process push notification when an user logged in |
---|
1037 | parameters: |
---|
1038 | - in: body |
---|
1039 | name: data |
---|
1040 | description: Operation data |
---|
1041 | required: true |
---|
1042 | schema: |
---|
1043 | type: object |
---|
1044 | properties: |
---|
1045 | ip: |
---|
1046 | type: string |
---|
1047 | user: |
---|
1048 | type: string |
---|
1049 | responses: |
---|
1050 | "200": |
---|
1051 | description: Successful operation |
---|
1052 | "400": |
---|
1053 | description: An error has occurred |
---|
1054 | tags: |
---|
1055 | - server |
---|
1056 | - agent |
---|
1057 | /ogagent/loggedout: |
---|
1058 | post: |
---|
1059 | description: Process push notification when an user is logged in |
---|
1060 | parameters: |
---|
1061 | - in: body |
---|
1062 | name: data |
---|
1063 | description: Operation data |
---|
1064 | required: true |
---|
1065 | schema: |
---|
1066 | type: object |
---|
1067 | properties: |
---|
1068 | ip: |
---|
1069 | type: string |
---|
1070 | user: |
---|
1071 | type: string |
---|
1072 | responses: |
---|
1073 | "200": |
---|
1074 | description: Successful operation |
---|
1075 | "400": |
---|
1076 | description: An error has occurred |
---|
1077 | tags: |
---|
1078 | - server |
---|
1079 | - agent |
---|