add docs

pull/35/head
Max Erenberg 1 year ago
parent 0a52b0b395
commit 9cbb0f299d
  1. 95
      docs/openapi.yaml
  2. 25
      docs/redoc-static.html

@ -713,16 +713,7 @@ paths:
description: Activate a cloud account for the calling user
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: '"OK"'
example: {"status": "OK"}
"$ref": "#/components/responses/SimpleSuccessResponse"
"403":
"$ref": "#/components/responses/InvalidMembershipErrorResponse"
/cloud/accounts/purge:
@ -757,6 +748,79 @@ paths:
description: usernames of accounts which were deleted
items:
type: string
/cloud/vhosts/{domain}:
put:
tags: ['cloud']
servers:
- url: https://biloba.csclub.uwaterloo.ca:9987/api
summary: Create a vhost
description: Add a new virtual host configuration.
parameters:
- name: domain
in: path
description: domain name of the virtual host
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
ip_address:
type: string
description: IP address of the virtual host
example: {"ip_address": "172.19.134.11"}
responses:
"200":
"$ref": "#/components/responses/SimpleSuccessResponse"
"403":
"$ref": "#/components/responses/InvalidMembershipErrorResponse"
delete:
tags: ['cloud']
servers:
- url: https://biloba.csclub.uwaterloo.ca:9987/api
summary: Delete a vhost
description: Delete a virtual host configuration.
parameters:
- name: domain
in: path
description: domain name of the virtual host
required: true
schema:
type: string
responses:
"200":
"$ref": "#/components/responses/SimpleSuccessResponse"
/cloud/vhosts:
get:
tags: ['cloud']
servers:
- url: https://biloba.csclub.uwaterloo.ca:9987/api
summary: List all vhosts
description: List all virtual host configurations for the calling user.
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
vhosts:
type: array
description: virtual hosts
items:
type: object
properties:
domain:
type: string
description: domain name of the virtual host
ip_address:
type: string
description: IP address of the virtual host
example: {"vhosts": [{"domain": "ctdalek.m.csclub.cloud", "ip_address": "172.19.134.11"}]}
components:
securitySchemes:
GSSAPIAuth:
@ -932,3 +996,14 @@ components:
InvalidMembershipErrorResponse:
<<: *ErrorResponse
description: Membership is invalid or expired
SimpleSuccessResponse:
description: Success
content:
application/json:
schema:
type: object
properties:
status:
type: string
description: '"OK"'
example: {"status": "OK"}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save