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

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since ccb862b was c008325, checked in by Ramón M. Gómez <ramongomez@…>, 7 years ago

#843: API REST uses new version file.

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