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

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 43b6d0b was 2fd9054, checked in by ramon <ramongomez@…>, 8 years ago

#708: Ruta REST para configuración de discos: incluir siempre nº de disco para evitar fallos si datos no ordenados.

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

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