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

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 be87371 was 4d06fd4b, checked in by ramon <ramongomez@…>, 7 years ago

#718: Adaptar la API REST que atiende notificaciones de logout de OGAgent.

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5539 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              logoutAt:
672                description: Time to send a logout operation to the client
673                type: string
674                format: date-time
675      responses:
676        "200":
677          description: Successful response
678      security:
679        - apikey: []
680      tags:
681        - server
682        - client
683        - remotepc
684  /ous/{ouid}/labs/{labid}/clients/{clientid}/unreserve:
685    delete:
686      description: Unreserve a client, clear its session data and send a poweroff operation.
687      parameters:
688        - $ref: "#/parameters/ouParam"
689        - $ref: "#/parameters/labParam"
690        - $ref: "#/parameters/clientParam"
691      responses:
692        "200":
693          description: Successful response
694      security:
695        - apikey: []
696      tags:
697        - server
698        - client
699        - remotepc
700  /ous/{ouid}/repos:
701    get:
702      description: Get all `repo` objects defined in an `OU`.
703      parameters:
704        - $ref: "#/parameters/ouParam"
705      responses:
706        "200":
707          description: Successful response
708          schema:
709            type: array
710            items:
711              type: object
712              properties:
713                id:
714                  type: integer
715                  format: int32
716                name:
717                  type: string
718                ou:
719                  type: object
720                  properties:
721                    id:
722                      type: integer
723                      format: int32
724              required: [ id, name, ou ]
725      security:
726        - apikey: []
727      tags:
728        - server
729        - repo
730  /ous/{ouid}/repos/{repoid}:
731    get:
732      description: Get a `repo` object.
733      parameters:
734        - $ref: "#/parameters/ouParam"
735        - $ref: "#/parameters/repoParam"
736      responses:
737        "200":
738          description: Successful response
739          schema:
740            type: object
741            properties:
742              id:
743                description: repository id
744                type: integer
745                format: int32
746              name:
747                description: repository name
748                type: string
749              description:
750                description: repository description
751                type: string
752              ip:
753                description: repository IP address
754                type: string
755            required: [ id, name, description, ip ]
756      security:
757        - apikey: []
758      tags:
759        - server
760        - repo
761  /ous/{ouid}/images:
762    get:
763      description: Get all `image` objects defined in an `OU`.
764      parameters:
765        - $ref: "#/parameters/ouParam"
766      responses:
767        "200":
768          description: Successful response
769          schema:
770            type: array
771            items:
772              type: object
773              properties:
774                id:
775                  type: integer
776                  format: int32
777                name:
778                  type: string
779                inremotepc:
780                  type: boolean
781                ou:
782                  type: object
783                  properties:
784                    id:
785                      type: integer
786                      format: int32
787              required: [ id, name, inremotepc, ou ]
788      security:
789        - apikey: []
790      tags:
791        - server
792        - image
793  /ous/{ouid}/images/{imageid}:
794    get:
795      description: Get an `image` object.
796      parameters:
797        - $ref: "#/parameters/ouParam"
798        - $ref: "#/parameters/imageParam"
799      responses:
800        "200":
801          description: Successful response
802          schema:
803            type: object
804            properties:
805              id:
806                description: image id
807                type: integer
808                format: int32
809              name:
810                description: image name
811                type: string
812              description:
813                description: image description
814                type: string
815              comments:
816                description: extra comments
817                type: string
818              inremotepc:
819                description: image usable in Remote PC Project flag
820                type: boolean
821              repo:
822                description: repository identification
823                type: object
824                properties:
825                  id:
826                    type: integer
827                    format: int32
828              type:
829                description: image type (``monolithic``, ``basic``, ``incremental``)
830                type: string
831                enum: [ "monolithic", "basic", "incremental" ]
832                default: "monolithic"
833              baseimg:
834                description: base image for an incremental image (if ``type`` is ``incremental``)
835                type: string
836              client:
837                description: model client's data
838                type: object
839                properties:
840                  id:
841                    description: model client's id.
842                    type: integer
843                    format: int32
844                  disk:
845                    description: source disk number
846                    type: integer
847                    format: int32
848                  partition:
849                    description: source partition number
850                    type: integer
851                    format: int32
852                required: [ id, disk, partition ]
853              creationdate:
854                description: image creation date
855                type: string
856                format: date-time
857              release:
858                description: image creation release
859                type: string
860              os:
861                description: installed operating system
862                type: string
863            required: [ id, name, description, comments, inremotepc, repo, type ]
864      security:
865        - apikey: []
866      tags:
867        - server
868        - image
869  /ous/{ouid}/images/{imageid}/software:
870    get:
871      description: Get software inventory store into an `image`
872      parameters:
873        - $ref: "#/parameters/ouParam"
874        - $ref: "#/parameters/imageParam"
875      responses:
876        "200":
877          description: Successful response
878          schema:
879            type: object
880            properties:
881              id:
882                description: image id
883                type: integer
884                format: int32
885              name:
886                description: image name
887                type: string
888              software:
889                description: software installed
890                type: object
891                properties:
892                  os:
893                    description: operating system
894                    type: string
895                  applications:
896                    type: array
897                    items:
898                      description: list of applications (name and version)
899                      type: string
900            required: [ id, name, software ]
901      security:
902        - apikey: []
903      tags:
904        - server
905        - image
906  /ous/{ouid}/images/{imageid}/reserve:
907    post:
908      description: |
909        Reserve a client with an installed image and send a boot/reboot operation.
910        If `labid` is specified, then choose a `client` defined in this lab.
911      parameters:
912        - $ref: "#/parameters/ouParam"
913        - $ref: "#/parameters/imageParam"
914        - in: body
915          name: data
916          description: Operation data
917          schema:
918            type: object
919            properties:
920              labid:
921                description: lab id filter (optional)
922                type: integer
923                format: int32
924                minimum: 1
925              maxtime:
926                description: maximum reservation time, in h. (optional, 24 h. by default)
927                type: integer
928                format: int32
929                minimum: 1
930                default: 24
931      responses:
932        "200":
933          description: Reserve a client to boot using an operating system image.
934          schema:
935            $ref: "#/definitions/SelectedClientModel"
936      security:
937        - apikey: []
938      tags:
939        - server
940        - image
941        - remotepc
942  /repository/images:
943    get:
944      description: Get information about images stored in a repository
945      responses:
946        "200":
947          description: Successful response
948          schema:
949            type: object
950            properties:
951              directory:
952                description: repository directory
953                type: string
954              images:
955                description: information about repository-global images
956                type: array
957                items:
958                  $ref: "#/definitions/ImageModel"
959              ous:
960                description: OUs defined
961                type: array
962                items:
963                  type: object
964                  properties:
965                    subdir:
966                      description: OU subdirectory
967                      type: string
968                    images:
969                      description: information about OU-based images
970                      type: array
971                      items:
972                        $ref: "#/definitions/ImageModel"
973              disk:
974                description: repository disk information
975                type: object
976                properties:
977                  total:
978                    description: total disk space
979                    type: string
980                  used:
981                    description: disk space used by files
982                    type: string
983                  free:
984                    description: amount of free disk space
985                    type: string
986                  percent:
987                    description: percentage of used space
988                    type: string
989                required: [ total, used, free, percent ]
990            required: [ directory, images, ous, disk ]
991      security:
992        - apikey: []
993      tags:
994        - repository
995        - image
996  /repository/image/{ouname}/{imagename}:
997    get:
998      description: Get information about an specific image stored in the repository
999      parameters:
1000        - in: path
1001          name: ouname
1002          description: OU name (optional)
1003          required: false
1004          type: string
1005        - in: path
1006          name: imagename
1007          description: image name
1008          required: true
1009          type: string
1010      responses:
1011        "200":
1012          description: Successful response
1013          schema:
1014            $ref: "#/definitions/ImageModel"
1015      security:
1016        - apikey: []
1017      tags:
1018        - repository
1019        - image
1020  /repository/poweron:
1021    post:
1022      description: send Wake-On-Lan notification to many clients
1023      parameters:
1024        - in: body
1025          name: data
1026          description: Operation data
1027          required: true
1028          schema:
1029            type: object
1030            properties:
1031              macs:
1032                type: array
1033                items:
1034                  description: MAC (Ethernet) address
1035                  type: string
1036      responses:
1037        "200":
1038          description: Successful response
1039          schema:
1040            type: object
1041            properties:
1042              output:
1043                type: string
1044      security:
1045        - apikey: []
1046      tags:
1047        - repository
1048        - client
1049  /ogagent/started:
1050    post:
1051      description: Process push notification when OGAgent is started
1052      parameters:
1053        - in: body
1054          name: data
1055          description: Operation data
1056          required: true
1057          schema:
1058            type: object
1059            properties:
1060              ip:
1061                type: string
1062              mac:
1063                type: string
1064              ostype:
1065                type: string
1066              osversion:
1067                type: string
1068              secret:
1069                type: string
1070      responses:
1071        "200":
1072          description: Successful operation
1073        "400":
1074          description: An error has occurred
1075      tags:
1076        - server
1077        - agent
1078  /ogagent/stopped:
1079    post:
1080      description: Process push notification when OGAgent is stopped
1081      parameters:
1082        - in: body
1083          name: data
1084          description: Operation data
1085          required: true
1086          schema:
1087            type: object
1088            properties:
1089              ip:
1090                type: string
1091              mac:
1092                type: string
1093              ostype:
1094                type: string
1095              osversion:
1096                type: string
1097      responses:
1098        "200":
1099          description: Successful operation
1100        "400":
1101          description: An error has occurred
1102      tags:
1103        - server
1104        - agent
1105  /ogagent/loggedin:
1106    post:
1107      description: Process push notification when an user logged in
1108      parameters:
1109        - in: body
1110          name: data
1111          description: Operation data
1112          required: true
1113          schema:
1114            type: object
1115            properties:
1116              ip:
1117                type: string
1118              user:
1119                type: string
1120              language:
1121                type: string
1122              ostype:
1123                type: string
1124              osversion:
1125                type: string
1126      responses:
1127        "200":
1128          description: Successful operation
1129        "400":
1130          description: An error has occurred
1131      tags:
1132        - server
1133        - agent
1134  /ogagent/loggedout:
1135    post:
1136      description: Process push notification when an user is logged in
1137      parameters:
1138        - in: body
1139          name: data
1140          description: Operation data
1141          required: true
1142          schema:
1143            type: object
1144            properties:
1145              ip:
1146                type: string
1147              user:
1148                type: string
1149      responses:
1150        "200":
1151          description: Successful operation
1152        "400":
1153          description: An error has occurred
1154      tags:
1155        - server
1156        - agent
1157parameters:
1158  ouParam:
1159    name: ouid
1160    in: path
1161    description: OU identificator
1162    required: true
1163    type: integer
1164    minimum: 1
1165  labParam:
1166    name: labid
1167    in: path
1168    description: Lab identificator
1169    required: true
1170    type: integer
1171    minimum: 1
1172  clientParam:
1173    name: clientid
1174    in: path
1175    description: Client identificator
1176    required: true
1177    type: integer
1178    minimum: 1
1179  repoParam:
1180    name: repoid
1181    in: path
1182    description: repository identificator
1183    required: true
1184    type: integer
1185    minimum: 1
1186  imageParam:
1187    name: imageid
1188    in: path
1189    description: image definition identificator
1190    required: true
1191    type: integer
1192    minimum: 1
1193definitions:
1194  StatusModel:     
1195    type: object
1196    properties:
1197      id:
1198        description: client id
1199        type: integer
1200        format: int32
1201        minimum: 1
1202      ip:
1203        description: client IP address
1204        type: string
1205      status:
1206        description: execution status
1207        type: string
1208        enum: [ "off", "oglive", "busy", "linux", "windows", "macos", "unknown" ]
1209      loggedin:
1210        description: flag to check if an user is logged in
1211        type: boolean
1212    required: [ id, ip, status ]
1213  SelectedClientModel:     
1214    type: object
1215    properties:
1216      id:
1217        description: client id
1218        type: integer
1219        format: int32
1220        minimum: 1
1221      name:
1222        description: client name
1223        type: string
1224      mac:
1225        description: client MAC address
1226        type: string
1227      ip:
1228        description: client IP address
1229        type: string
1230      lab:
1231        description: client's lab
1232        type: object
1233        properties:
1234          id:
1235            description: lab id
1236            type: integer
1237            format: int32
1238            minimum: 1
1239        required: [ id ]
1240      ou:
1241        description: client's OU
1242        type: object
1243        properties:
1244          id:
1245            description: OU id
1246            type: integer
1247            format: int32
1248            minimum: 1
1249        required: [ id ]
1250    required: [ id, name, mac, ip, lab, ou ]
1251  ImageModel:
1252    type: object
1253    properties:
1254      name:
1255        description: image name (file name without extension)
1256        type: string
1257      type:
1258        description: image type (file extension or `dir` for directory image)
1259        type: string
1260      clientname:
1261        description: source client name
1262        type: string
1263      clonator:
1264        description: clonation program
1265        type: string
1266      compressor:
1267        description: compression program
1268        type: string
1269      filesystem:
1270        description: filesystem type
1271        type: string
1272      datasize:
1273        description: data size (bytes)
1274        type: integer
1275        format: int64
1276      size:
1277        description: image size (bytes)
1278        type: integer
1279        format: int64
1280      modified:
1281        description: image modification date
1282        type: string
1283        format: date-time
1284      mode:
1285        description: image access permissions (four octal digits)
1286        type: string
1287      backedup:
1288        description: image backed up flag (check if `.ant` file exists)
1289        type: boolean
1290        default: false
1291      backupsize:
1292        description: image backup size (bytes)
1293        type: integer
1294        format: int64
1295      locked:
1296        description: image locked flag (check if `.lock` file exists)
1297        type: boolean
1298        default: false
1299    required: [ name, type, clientname, clonator, compressor, filesystem, datasize, size, modified, mode, backedup, locked ]
1300
Note: See TracBrowser for help on using the repository browser.