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

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 208ee50 was 353c112, checked in by ramon <ramongomez@…>, 9 years ago

#708: Soportar obtener estado de un cliente iniciado en sistema operativo llamando a la API REST de su OGAgent.

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

  • Property mode set to 100644
File size: 22.7 KB
Line 
1# Example YAML to get you started quickly.
2# Be aware that YAML has indentation based scoping.
3# Code completion support is available so start typing for available options.
4swagger: '2.0'
5
6# This is your document metadata
7info:
8  version: "1.1.0"
9  title: OpenGnsys REST API definition
10  description: |
11    Information about the OpenGnsys REST API functions (including Server and
12    Repository Manager).
13  contact:
14    name: OpenGnsys Project
15    url: http://opengnsys.es/
16    email: opengnsys-devel@listas.unizar.es
17  license:
18    name: Creative Commons 4.0 International
19    url: http://creativecommons.org/licenses/by/4.0/
20basePath: /opengnsys/rest
21schemes:
22  - https
23consumes:
24  - application/json
25produces:
26  - application/json
27securityDefinitions:
28  apikey:
29    type: apiKey
30    name: Authorization
31    in: header
32# Paths description.
33paths:
34  /login:
35    post:
36      description: Check user login and returns his/her API key.
37      parameters:
38        - in: body
39          name: authdata
40          description: JSON authentication data
41          required: true
42          schema:
43            type: object
44            properties:
45              username:
46                type: string
47              password:
48                type: string
49                format: password
50      responses:
51        "200":
52          description: Successful login
53          schema:
54            type: object
55            properties:
56              userid:
57                type: integer
58                description: user identificator
59                format: int32
60              apikey:
61                description: API key to include in ``Authorization`` header
62                type: string
63        "400":
64          description: Missing parameters
65        "500":
66          description: Authentication error
67      tags:
68        - server
69        - user
70  /ous:
71    get:
72      description: Gets all `OU` objects.
73      responses:
74        "200":
75          description: Successful response
76          schema:
77            type: array
78            items:
79              type: object
80              properties:
81                id:
82                  type: integer
83                  description: Organization Unit identificator
84                  format: int32
85                  minimum: 1
86                name:
87                  type: string
88                  description: Organization Unit name
89      tags:
90        - server
91        - ou
92  /ous/{ouid}:
93    get:
94      description: Get an `OU` object.
95      parameters:
96        - name: ouid
97          in: path
98          description: Organization Unit identificator
99          required: true
100          type: integer
101      responses:
102        "200":
103          description: Successful response
104          schema:
105            type: object
106            properties:
107              id:
108                type: integer
109                description: OU identificator
110              name:
111                type: string
112                description: OU name
113              description:
114                type: string
115                description: OU description
116      security:
117        - apikey: []
118      tags:
119        - server
120        - ou
121  /ous/{ouid}/labs:
122    get:
123      description: Get all `lab` objects defined in an `OU`.
124      parameters:
125        - name: ouid
126          in: path
127          description: OU identificator
128          required: true
129          type: integer
130      responses:
131        "200":
132          description: Successful response
133          schema:
134            type: array
135            items:
136              type: object
137              properties:
138                id:
139                  type: integer
140                  description: laboratory identificator
141                  format: int32
142                name:
143                  type: string
144                  description: laboratory name
145                inremotepc:
146                  type: boolean
147                  description: laboratory usable in Remote PC Project flag
148                ou:
149                  type: object
150                  properties:
151                    id:
152                      type: integer
153                      description: OU identificator
154                      format: int32
155      security:
156        - apikey: []
157      tags:
158        - server
159        - lab
160  /ous/{ouid}/labs/{labid}:
161    get:
162      description: Get a `lab` object.
163      parameters:
164        - name: ouid
165          in: path
166          description: OU identificator
167          required: true
168          type: integer
169        - name: labid
170          in: path
171          description: laboratory identificator
172          required: true
173          type: integer
174      responses:
175        "200":
176          description: Successful response
177          schema:
178            type: object
179            properties:
180              id:
181                description: laboratory identificator
182                type: integer
183                format: int32
184              name:
185                description: laboratory name
186                type: string
187              location:
188                description: laboratory location
189                type: string
190              description:
191                description: laboratory description
192                type: string
193              inremotepc:
194                description: check if this lab can be included in Remote PC Project
195                type: boolean
196              capacity:
197                description: maximum number of people in the lab
198                type: integer
199                format: int32
200              defclients:
201                description: number of defined clients in the lab
202                type: integer
203                format: int32
204              projector:
205                description: check if this lab has a projector
206                type: boolean
207              board:
208                description: check if this lab has an electronic board
209                type: boolean
210              routerip:
211                description: lab router IP address
212                type: string
213              netmask:
214                description: network mask to use in the lab
215                type: string
216              ntp:
217                description: NTP server IP address
218                type: string
219              dns:
220                description: DNS server IP address
221                type: string
222              proxyurl:
223                description: Proxy server URL
224                type: string
225              mcastmode:
226                description: Multicast protocol mode (full-duplex, half-duplex).
227                type: string
228                enum: [ "full-duplex", "half-duplex" ]
229                default: "full-duplex"
230              mcastip:
231                description: Multicast IP address
232                type: string
233              mcastport:
234                description: Multicast port
235                type: integer
236                format: int32
237              mcastspeed:
238                description: Multicast speed (in Mbps)
239                type: integer
240                format: int32
241              p2pmode:
242                description: Bittorrent connection type ("peer", "leecher". "seeder").
243                type: string
244              p2ptime:
245                description: Bittorrent connection extra time (in s.)
246                type: integer
247                format: int32
248              image:
249                description: Lab's picture file
250                type: string
251      security:
252        - apikey: []
253      tags:
254        - server
255        - lab
256  /ous/{ouid}/labs/{labid}/clients:
257    get:
258      description: Get all `client` objects defined in an `lab`.
259      parameters:
260        - name: ouid
261          in: path
262          description: OU identificator
263          required: true
264          type: integer
265        - name: labid
266          in: path
267          description: Lab identificator
268          required: true
269          type: integer
270      responses:
271        "200":
272          description: Successful response
273          schema:
274            type: array
275            items:
276              type: object
277              properties:
278                id:
279                  type: integer
280                  format: int32
281                name:
282                  type: string
283                ou:
284                  type: object
285                  properties:
286                    id:
287                      type: integer
288                      format: int32
289                lab:
290                  type: object
291                  properties:
292                    id:
293                      type: integer
294                      format: int32
295      security:
296        - apikey: []
297      tags:
298        - server
299        - client
300  /ous/{ouid}/labs/{labid}/clients/{clientid}:
301    get:
302      description: Get a `client` object.
303      parameters:
304        - name: ouid
305          in: path
306          description: OU identificator
307          required: true
308          type: integer
309        - name: labid
310          in: path
311          description: Lab identificator
312          required: true
313          type: integer
314        - name: clientid
315          in: path
316          description: Client identificator
317          required: true
318          type: integer
319      responses:
320        "200":
321          description: Successful response
322          schema:
323            type: object
324            properties:
325              id:
326                description: client id
327                type: integer
328                format: int32
329              name:
330                description: client name
331                type: string
332              serialno:
333                description: client serial number
334                type: string
335              netiface:
336                description: main network interface
337                type: string
338              netdriver:
339                description: client MAC address (kernel module)
340                type: string
341              mac:
342                description: client MAC address
343                type: string
344              ip:
345                description: client IP address
346                type: string
347              netmask:
348                description: subnet mask address
349                type: string
350              routerip:
351                description: network router IP address
352                type: string
353              repo:
354                description: repository identification
355                type: object
356                properties:
357                  id:
358                    type: integer
359                    format: int32
360              validation:
361                description: boot validation flag
362                type: boolean
363              boottype:
364                description: boot template type
365                type: string
366              image:
367                description: client's picture file
368                type: string
369      security:
370        - apikey: []
371      tags:
372        - server
373        - client
374  /ous/{ouid}/labs/{labid}/clients/{clientid}/hardware:
375    get:
376      description: Get the hardware definition of a `client` object.
377      parameters:
378        - name: ouid
379          in: path
380          description: OU identificator
381          required: true
382          type: integer
383        - name: labid
384          in: path
385          description: Lab identificator
386          required: true
387          type: integer
388        - name: clientid
389          in: path
390          description: Client identificator
391          required: true
392          type: integer
393      responses:
394        "200":
395          description: Successful response
396          schema:
397            type: object
398            properties:
399              id:
400                description: client id
401                type: integer
402                format: int32
403              name:
404                description: client name
405                type: string
406              hardware:
407                description: hardware components
408                type: array
409                items:
410                  type: object
411                  properties:
412                    type:
413                      description: hardware component type
414                      type: string
415                    description:
416                      description: hardware component description
417                      type: string
418      tags:
419        - server
420        - client
421  /ous/{ouid}/labs/{labid}/clients/{clientid}/diskcfg:
422    get:
423      description: Get disks configuration of a `client`
424      parameters:
425        - name: ouid
426          in: path
427          description: OU identificator
428          required: true
429          type: integer
430        - name: labid
431          in: path
432          description: Lab identificator
433          required: true
434          type: integer
435        - name: clientid
436          in: path
437          description: Client identificator
438          required: true
439          type: integer
440      responses:
441        "200":
442          description: Successful response
443          schema:
444            type: object
445            properties:
446              id:
447                description: client id
448                type: integer
449                format: int32
450              name:
451                description: client name
452                type: string
453              diskcfg:
454                description: |
455                  array of disk configuration data, including general disk information and
456                  partition/filesystem information (if not specified in paratmeter
457                  description, it is only valid in partition configuration).
458                type: array
459                items:
460                  type: object
461                  properties:
462                    disk:
463                      description: disk number (only for disks configurations)
464                      type: integer
465                      format: int32
466                    parttable:
467                      description: partition table type (only for disks configurations)
468                      type: string
469                      enum: [ "MSDOS", "GPT", "LVM", "ZVOL" ]
470                    partition:
471                      description: partition number
472                      type: integer
473                      format: int32
474                      minimum: 1
475                    parttype:
476                      description: partition type
477                      type: string
478                    size:
479                      description: disk size (used in both, disk and partition configuration)
480                      type: integer
481                      format: int64
482                    filesystem:
483                      description: filesystem type
484                      type: string
485                    usage:
486                      description: data usage percentage in a formated filesystem
487                      type: integer
488                      format: int32
489                    os:
490                      description: installed operating system
491                      type: string
492                    image:
493                      description: restaured image data (if needed)
494                      type: object
495                      properties:
496                        id:
497                          type: integer
498                          format: int32
499                        deploydate:
500                          description: image restauration/deploying date
501                          type: string
502                          format: date-time
503                        updated:
504                          description: flag to check if the restaured image is updated
505                          type: boolean
506      tags:
507        - server
508        - client
509  /ous/{ouid}/labs/{labid}/clients/{clientid}/status:
510    get:
511      description: Get execution status of a `client`
512      parameters:
513        - name: ouid
514          in: path
515          description: OU identificator
516          required: true
517          type: integer
518        - name: labid
519          in: path
520          description: Lab identificator
521          required: true
522          type: integer
523        - name: clientid
524          in: path
525          description: Client identificator
526          required: true
527          type: integer
528      responses:
529        "200":
530          description: Successful response
531          schema:
532            type: object
533            properties:
534              id:
535                description: client id
536                type: integer
537                format: int32
538              ip:
539                description: client IP address
540                type: string
541              status:
542                description: execution status
543                type: string
544                enum: [ "nodata", "off", "ogclient", "busy", "linux", "windows", "unknown" ]
545              loggedin:
546                description: flag to check if an user is logged in
547                type: boolean
548      tags:
549        - server
550        - client
551  /ous/{ouid}/repos:
552    get:
553      description: Get all `repo` objects defined in an `OU`.
554      parameters:
555        - name: ouid
556          in: path
557          description: OU identificator
558          required: true
559          type: integer
560      responses:
561        "200":
562          description: Successful response
563          schema:
564            type: array
565            items:
566              type: object
567              properties:
568                id:
569                  type: integer
570                  format: int32
571                name:
572                  type: string
573                ou:
574                  type: object
575                  properties:
576                    id:
577                      type: integer
578                      format: int32
579      security:
580        - apikey: []
581      tags:
582        - server
583        - repo
584  /ous/{ouid}/repos/{repoid}:
585    get:
586      description: Get a `repo` object.
587      parameters:
588        - name: ouid
589          in: path
590          description: OU identificator
591          required: true
592          type: integer
593        - name: repoid
594          in: path
595          description: repository identificator
596          required: true
597          type: integer
598      responses:
599        "200":
600          description: Successful response
601          schema:
602            type: object
603            properties:
604              id:
605                description: repository id
606                type: integer
607                format: int32
608              name:
609                description: repository name
610                type: string
611              description:
612                description: repository description
613                type: string
614              ip:
615                description: repository IP address
616                type: string
617      security:
618        - apikey: []
619      tags:
620        - server
621        - repo
622  /ous/{ouid}/images:
623    get:
624      description: Get all `image` objects defined in an `OU`.
625      parameters:
626        - name: ouid
627          in: path
628          description: OU identificator
629          required: true
630          type: integer
631      responses:
632        "200":
633          description: Successful response
634          schema:
635            type: array
636            items:
637              type: object
638              properties:
639                id:
640                  type: integer
641                  format: int32
642                name:
643                  type: string
644                inremotepc:
645                  type: boolean
646                ou:
647                  type: object
648                  properties:
649                    id:
650                      type: integer
651                      format: int32
652      security:
653        - apikey: []
654      tags:
655        - server
656        - image
657  /ous/{ouid}/images/{imageid}:
658    get:
659      description: Get an `image` object.
660      parameters:
661        - name: ouid
662          in: path
663          description: OU identificator
664          required: true
665          type: integer
666        - name: imageid
667          in: path
668          description: image definition identificator
669          required: true
670          type: integer
671      responses:
672        "200":
673          description: Successful response
674          schema:
675            type: object
676            properties:
677              id:
678                description: image id
679                type: integer
680                format: int32
681              name:
682                description: image name
683                type: string
684              description:
685                description: image description
686                type: string
687              inremotepc:
688                description: image usable in Remote PC Project flag
689                type: boolean
690              type:
691                description: image type (``monolithic``, ``basic``, ``incremental``)
692                type: string
693              baseimg:
694                description: base image for an incremental image (if ``type`` is ``incremental``)
695                type: string
696              path:
697                description: image path (if ``type`` is ``incremental``)
698                type: string
699              repo:
700                description: repository identification
701                type: object
702                properties:
703                  id:
704                    type: integer
705                    format: int32
706              client:
707                description: model client's data
708                type: object
709                properties:
710                  id:
711                    description: model client's id.
712                    type: integer
713                    format: int32
714                  disk:
715                    description: source disk number
716                    type: integer
717                    format: int32
718                  partition:
719                    description: source partition number
720                    type: integer
721                    format: int32
722              creationdate:
723                description: image creation date
724                type: string
725                format: date-time
726              release:
727                description: image creation release
728                type: string
729      security:
730        - apikey: []
731      tags:
732        - server
733        - image
734  /ous/{ouid}/images/{imageid}/software:
735    get:
736      description: Get software inventory store into an `image`
737      parameters:
738        - name: ouid
739          in: path
740          description: OU identificator
741          required: true
742          type: integer
743        - name: imageid
744          in: path
745          description: image definition identificator
746          required: true
747          type: integer
748      responses:
749        "200":
750          description: Successful response
751          schema:
752            type: object
753            properties:
754              id:
755                description: image id
756                type: integer
757                format: int32
758              name:
759                description: image name
760                type: string
761              os:
762                description: installed operating system
763                type: string
764              software:
765                description: array of installed applications
766                type: array
767                items:
768                  type: object
769                  properties:
770                    application:
771                      description: application name and version
772                      type: string
773  #/ous/{ouid}/images/{imageid}/boot:
774  #/repository/images
775  #/repository/poweron
776  #/ogagent/started
777  #/ogagent/stopped
778  #/ogagent/loggedin
779  #/ogagent/loggedout
Note: See TracBrowser for help on using the repository browser.