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

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-instalacionwebconsole3
Last change on this file since 3bbaf79 was 61e5ebd, checked in by ramon <ramongomez@…>, 7 years ago

#839: Correción en API REST para RemotePC: permitir sesión ilimitada si parámetro deadLine=0.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5763 a21b9725-9963-47de-94b9-378ad31fedc9

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