diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2019-11-15 13:41:48 +0100 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2019-11-15 13:41:48 +0100 |
commit | dae2b131ff6a982a51d12ab5569a0e52051e8429 (patch) | |
tree | 0dc7b9049f27cfdcf210a8d717571196f82120e7 /admin/WebConsole/rest | |
parent | ccb862bed934927bda1fc47841b7857426161744 (diff) |
#816: Updating web REST API definition.
Diffstat (limited to 'admin/WebConsole/rest')
-rw-r--r-- | admin/WebConsole/rest/opengnsys-api.yml | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/admin/WebConsole/rest/opengnsys-api.yml b/admin/WebConsole/rest/opengnsys-api.yml index 13ea37a1..bea6cae2 100644 --- a/admin/WebConsole/rest/opengnsys-api.yml +++ b/admin/WebConsole/rest/opengnsys-api.yml @@ -1,11 +1,11 @@ swagger: '2.0' info: - version: "1.1.0" + version: "1.1.1" title: OpenGnsys REST API definition description: | Information about the OpenGnsys REST API functions (including Server and - Repository Manager). + Repository Manager) contact: name: OpenGnsys Project url: https://opengnsys.es/ @@ -24,11 +24,10 @@ securityDefinitions: type: apiKey name: Authorization in: header -# Paths description. paths: /login: post: - description: Check user login and returns his/her API key. + description: Check user login and returns his/her API key parameters: - in: body name: authdata @@ -62,7 +61,7 @@ paths: properties: message: type: string - "500": + "401": description: Authentication error schema: type: object @@ -74,7 +73,7 @@ paths: - user /info: get: - description: Gets OpenGnsys Server information + description: Get OpenGnsys Server information responses: "200": description: Successful response @@ -134,7 +133,7 @@ paths: - repository /status: get: - description: Gets OpenGnsys Server status information + description: Get OpenGnsys Server status information responses: "200": description: Successful response @@ -169,7 +168,7 @@ paths: - server /ous: get: - description: Gets all `OU` objects. + description: Get all `OU` objects responses: "200": description: Successful response @@ -192,7 +191,7 @@ paths: - ou /ous/{ouid}: get: - description: Get an `OU` object. + description: Get an `OU` object parameters: - $ref: "#/parameters/ouParam" responses: @@ -218,7 +217,7 @@ paths: - ou /ous/{ouid}/groups: get: - description: Get all group of labs defined in an `OU` object. + description: Get all group of labs defined in an `OU` object parameters: - $ref: "#/parameters/ouParam" responses: @@ -258,7 +257,7 @@ paths: - ou /ous/{ouid}/labs: get: - description: Get all `lab` objects defined in an `OU`. + description: Get all `lab` objects defined in an `OU` parameters: - $ref: "#/parameters/ouParam" responses: @@ -301,7 +300,7 @@ paths: - lab /ous/{ouid}/labs/{labid}: get: - description: Get a `lab` object. + description: Get a `lab` object parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -357,7 +356,7 @@ paths: description: Proxy server URL type: string mcastmode: - description: Multicast protocol mode (full-duplex, half-duplex). + description: Multicast protocol mode (full-duplex, half-duplex) type: string enum: [ "full-duplex", "half-duplex" ] default: "full-duplex" @@ -373,7 +372,7 @@ paths: type: integer format: int32 p2pmode: - description: Bittorrent connection type ("peer", "leecher". "seeder"). + description: Bittorrent connection type ("peer", "leecher". "seeder") type: string p2ptime: description: Bittorrent connection extra time (in s.) @@ -390,7 +389,7 @@ paths: - lab /ous/{ouid}/labs/{labid}/clients: get: - description: Get all `client` objects defined in an `lab`. + description: Get all `client` objects defined in a `lab` parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -426,7 +425,7 @@ paths: - client /ous/{ouid}/labs/{labid}/clients/{clientid}: get: - description: Get a `client` object. + description: Get a `client` object parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -451,7 +450,7 @@ paths: description: main network interface type: string netdriver: - description: client MAC address (kernel module) + description: network interface driver (kernel module) type: string mac: description: client MAC address @@ -472,6 +471,9 @@ paths: id: type: integer format: int32 + profclient: + description: check if this client is used to teach (professor cleint) + type: boolean validation: description: boot validation flag type: boolean @@ -481,7 +483,7 @@ paths: picture: description: client's picture file type: string - required: [ id, name, serialno, netiface, netdriver, mac, ip, netmask, routerip, repo, validation, picture ] + required: [ id, name, serialno, netiface, netdriver, mac, ip, netmask, routerip, repo, profclient, validation, picture ] security: - apikey: [] tags: @@ -489,7 +491,7 @@ paths: - client /ous/{ouid}/labs/{labid}/clients/{clientid}/hardware: get: - description: Get the hardware definition of a `client` object. + description: Get the hardware definition of a `client` object parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -528,7 +530,7 @@ paths: - client /ous/{ouid}/labs/{labid}/clients/{clientid}/diskcfg: get: - description: Get disks configuration of a `client` + description: Get disk configuration of a `client` parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -550,7 +552,7 @@ paths: description: | array of disk configuration data, including general disk information and partition/filesystem information (if not specified in paratmeter - description, it is only valid in partition configuration). + description, it is only valid in partition configuration) type: array items: type: object @@ -625,7 +627,7 @@ paths: - client /ous/{ouid}/labs/{labid}/clients/{clientid}/events: post: - description: Store UDS server URLs to resend some events recieved from OGAgent. + description: Store UDS server URLs to resend some events recieved from OGAgent parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -638,10 +640,10 @@ paths: type: object properties: urlLogin: - description: URL to resend a login event. + description: URL to resend a login event type: string urlLogout: - description: URL to resend a logout event. + description: URL to resend a logout event type: string required: [ urlLogin, urlLogout ] responses: @@ -662,7 +664,7 @@ paths: - remotepc /ous/{ouid}/labs/{labid}/clients/{clientid}/session: post: - description: Record session data for a client. + description: Record session data for a client parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -691,7 +693,7 @@ paths: - remotepc /ous/{ouid}/labs/{labid}/clients/{clientid}/unreserve: delete: - description: Unreserve a client, clear its session data and send a poweroff operation. + description: Unreserve a client, clear its session data and send a poweroff operation parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/labParam" @@ -707,7 +709,7 @@ paths: - remotepc /ous/{ouid}/repos: get: - description: Get all `repo` objects defined in an `OU`. + description: Get all `repo` objects defined in an `OU` parameters: - $ref: "#/parameters/ouParam" responses: @@ -737,7 +739,7 @@ paths: - repo /ous/{ouid}/repos/{repoid}: get: - description: Get a `repo` object. + description: Get a `repo` object parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/repoParam" @@ -768,7 +770,7 @@ paths: - repo /ous/{ouid}/images: get: - description: Get all `image` objects defined in an `OU`. + description: Get all `image` objects defined in an `OU` parameters: - $ref: "#/parameters/ouParam" responses: @@ -800,7 +802,7 @@ paths: - image /ous/{ouid}/images/{imageid}: get: - description: Get an `image` object. + description: Get an `image` object parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/imageParam" @@ -846,7 +848,7 @@ paths: type: object properties: id: - description: model client's id. + description: model client's id type: integer format: int32 disk: @@ -914,8 +916,8 @@ paths: /ous/{ouid}/images/{imageid}/reserve: post: description: | - Reserve a client with an installed image and send a boot/reboot operation. - If `labid` is specified, then choose a `client` defined in this lab. + Reserve a client with an installed image and send a boot/reboot operation + (if `labid` is specified, then choose a `client` defined in this lab) parameters: - $ref: "#/parameters/ouParam" - $ref: "#/parameters/imageParam" @@ -931,14 +933,14 @@ paths: format: int32 minimum: 1 maxtime: - description: maximum reservation time, in h. (optional, 24 h. by default) + description: maximum reservation time, in hours (optional, 24 h. by default) type: integer format: int32 minimum: 1 default: 24 responses: "200": - description: Reserve a client to boot using an operating system image. + description: Reserve a client to boot using an operating system image schema: $ref: "#/definitions/SelectedClientModel" security: @@ -965,7 +967,7 @@ paths: items: $ref: "#/definitions/ImageModel" ous: - description: OUs defined + description: defined OUs type: array items: type: object @@ -1027,7 +1029,7 @@ paths: - image /repository/poweron: post: - description: send Wake-On-Lan notification to many clients + description: Send Wake-On-Lan notification to many clients parameters: - in: body name: data @@ -1056,7 +1058,7 @@ paths: - client /ogagent/started: post: - description: Process push notification when OGAgent is started + description: Notification when OGAgent is started parameters: - in: body name: data @@ -1085,7 +1087,7 @@ paths: - agent /ogagent/stopped: post: - description: Process push notification when OGAgent is stopped + description: Notification when OGAgent is stopped parameters: - in: body name: data @@ -1112,7 +1114,7 @@ paths: - agent /ogagent/loggedin: post: - description: Process push notification when an user logged in + description: Notification when an user logs in parameters: - in: body name: data @@ -1141,7 +1143,7 @@ paths: - agent /ogagent/loggedout: post: - description: Process push notification when an user is logged in + description: Notification when an user logs out parameters: - in: body name: data @@ -1173,14 +1175,14 @@ parameters: labParam: name: labid in: path - description: Lab identificator + description: lab identificator required: true type: integer minimum: 1 clientParam: name: clientid in: path - description: Client identificator + description: client identificator required: true type: integer minimum: 1 |