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