diff options
author | ramon <ramongomez@us.es> | 2016-11-15 13:57:56 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2016-11-15 13:57:56 +0000 |
commit | 146d95527531ac58930b28f50d7a57271e7a5a1f (patch) | |
tree | de882b8b1bb5c1480fd79387445373fa3a807b53 /admin/WebConsole/rest/opengnsys-api.yml | |
parent | 4dea2be384b94897c87ea6f89198d94d001feccd (diff) |
#708: AƱadir algunos campos en rutas REST; docmentar ruta {{{/ous/:ouid/groups}}} y repasar definciones de seguridad y de campos requeridos.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5092 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/opengnsys-api.yml')
-rw-r--r-- | admin/WebConsole/rest/opengnsys-api.yml | 138 |
1 files changed, 96 insertions, 42 deletions
diff --git a/admin/WebConsole/rest/opengnsys-api.yml b/admin/WebConsole/rest/opengnsys-api.yml index f14833d9..23625bc8 100644 --- a/admin/WebConsole/rest/opengnsys-api.yml +++ b/admin/WebConsole/rest/opengnsys-api.yml @@ -72,11 +72,29 @@ paths: type: object properties: memInfo: - description: Memory information - $ref: '#/definitions/meminfo' + description: memory information + properties: + total: + description: total amount of memory + type: integer + format: int64 + used: + description: amount of used memory + type: integer + format: int64 + required: [ total, used ] cpu: description: CPU information - $ref: '#/definitions/cpu' + properties: + model: + description: processor model + type: string + usage: + description: average of processor load + type: number + format: float + required: [ model, usage ] + required: [ memInfo, cpu ] tags: - server /ous: @@ -98,6 +116,7 @@ paths: name: type: string description: Organization Unit name + required: [ id, name ] tags: - server - ou @@ -125,30 +144,56 @@ paths: description: type: string description: OU description + required: [ id, name, description ] + security: + - apikey: [] + tags: + - server + - ou + /ous/{ouid}/groups: + get: + description: Get all group of labs defined in an `OU` object. + parameters: + - name: ouid + in: path + description: Organization Unit identificator + required: true + type: integer + responses: + "200": + description: Successful response + schema: + type: array + items: + type: object + properties: + id: + description: group identificator + type: integer + format: int32 + name: + description: group name + type: string + type: + description: group type + type: integer + comments: + description: extra comments + type: string + parent: + description: parent group + type: object + properties: + id: + description: parent group identificator + type: integer + format: int32 + required: [ id, name, comments ] security: - apikey: [] tags: - server - ou -# /ous/{ouid}/groups: -# get: -# description: Get all group of labs defined in an `OU` object. -# parameters: -# - name: ouid -# in: path -# description: Organization Unit identificator -# required: true -# type: integer -# responses: -# "200": -# description: Successful response -# schema: -# ... -# security: -# - apikey: [] -# tags: -# - server -# - ou /ous/{ouid}/labs: get: description: Get all `lab` objects defined in an `OU`. @@ -176,13 +221,21 @@ paths: inremotepc: type: boolean description: laboratory usable in Remote PC Project flag - ou: + group: type: object properties: id: + description: group identificator type: integer + format: int32 + ou: + type: object + properties: + id: description: OU identificator + type: integer format: int32 + required: [ id, name; inremotepc, ou ] security: - apikey: [] tags: @@ -279,6 +332,7 @@ paths: image: description: Lab's picture file type: string + required: [ id, name, location, description, inremotepc, capacity, defclients, projector, board, routerip, netmask, modomul, mcastip, mcastport, mcastspeed, p2pmode, p2ptime, image ] security: - apikey: [] tags: @@ -307,9 +361,17 @@ paths: type: object properties: id: + description: client identificator type: integer format: int32 name: + description: client name + type: string + ip: + description: client IP address + type: string + mac: + description: client MAC (Ethernet) address type: string ou: type: object @@ -323,6 +385,7 @@ paths: id: type: integer format: int32 + required: [ id, name, ip, mac, ou, lab ] security: - apikey: [] tags: @@ -397,6 +460,7 @@ paths: image: description: client's picture file type: string + required: [ id, name, serialno, netiface, netdriver, mac, ip, netmask, routerip, repo, validation, image ] security: - apikey: [] tags: @@ -446,6 +510,10 @@ paths: description: description: hardware component description type: string + required: [ type, description ] + required: [ id, name, hardware ] + security: + - apikey: [] tags: - server - client @@ -534,6 +602,9 @@ paths: updated: description: flag to check if the restaured image is updated type: boolean + required: [ id, name, diskcfg ] + security: + - apikey: [] tags: - server - client @@ -576,6 +647,8 @@ paths: loggedin: description: flag to check if an user is logged in type: boolean + security: + - apikey: [] tags: - server - client @@ -911,22 +984,3 @@ paths: tags: - server - agent -definitions: - meminfo: - properties: - total: - description: Total amount of memory - type: integer - format: int64 - used: - description: Amount of used memory - type: integer - format: int64 - cpu: - properties: - model: - description: Processor model - type: string - usage: - description: Average of processor load - type: float |