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

configure-oglivelgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since dbfbdef was dae2b13, checked in by Ramón M. Gómez <ramongomez@…>, 5 years ago

#816: Updating web REST API definition.

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