source: admin/WebConsole/rest/opengnsys-api.yml

qndtest
Last change on this file was dae2b13, checked in by Ramón M. Gómez <ramongomez@…>, 5 years ago

#816: Updating web REST API definition.

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