add documentation #22

Merged
merenber merged 6 commits from docs into v1 2021-10-05 00:07:12 -04:00
2 changed files with 169 additions and 6 deletions
Showing only changes of commit 82fa87d356 - Show all commits

View File

@ -30,6 +30,8 @@ tags:
description: Operations on mailing list subscriptions
- name: uwldap
description: Operations related to the UW LDAP directory
- name: database
description: Operations related to databases
security:
- GSSAPIAuth: []
paths:
@ -564,6 +566,130 @@ paths:
items:
type: string
example: [['ctdalek', 'old_program', 'new_program']]
/db/mysql/{username}:
post:
tags: ['database']
summary: Create a MySQL database
description: Create a MySQL database for the user
parameters:
- name: username
in: path
description: name of the user to create MySQL database for
required: true
schema:
type: string
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: The password to the database
example: {"password": "7fUi5rQr/lcpeEj4M86ZBbwM"}
"400":
$ref: "#/components/responses/InvalidUsernameErrorResponse"
"404":
$ref: "#/components/responses/UserNotFoundErrorResponse"
"409":
$ref: "#/components/responses/DBAlreadyCreatedErrorResponse"
"500":
$ref: "#/components/responses/DBConnectionOrPermissionErrorResponse"
/db/mysql/{username}/pwreset:
post:
tags: ['database']
summary: Reset MySQL database password
description: Reset the password for a user's MySQL database
parameters:
- name: username
in: path
description: name of the user to reset the MySQL database password for
required: true
schema:
type: string
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: The new password to the database
example: {"password": "kM90d3G/eofIUxr9O3CQHTlP"}
"400":
$ref: "#/components/responses/InvalidUsernameErrorResponse"
"404":
$ref: "#/components/responses/UserNotFoundErrorResponse"
"500":
$ref: "#/components/responses/DBConnectionOrPermissionErrorResponse"
/db/postgresql/{username}:
post:
tags: ['database']
summary: Create a PostgreSQL database
description: Create a PostgreSQL database for the user
parameters:
- name: username
in: path
description: name of the user to create PostgreSQL database for
required: true
schema:
type: string
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: The password to the database
example: {"password": "iHxd62DC7Qt1HyYRj18P6ujS"}
"400":
$ref: "#/components/responses/InvalidUsernameErrorResponse"
"404":
$ref: "#/components/responses/UserNotFoundErrorResponse"
"409":
$ref: "#/components/responses/DBAlreadyCreatedErrorResponse"
"500":
$ref: "#/components/responses/DBConnectionOrPermissionErrorResponse"
/db/postgresql/{username}/pwreset:
post:
tags: ['database']
summary: Reset PostgreSQL database password
description: Reset the password for a user's PostgreSQL database
parameters:
- name: username
in: path
description: name of the user to reset the PostgreSQL database password for
required: true
schema:
type: string
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: The new password to the database
example: {"password": "CdPHT49iYAWzzKuhKTt2dNeu"}
"400":
$ref: "#/components/responses/InvalidUsernameErrorResponse"
"404":
$ref: "#/components/responses/UserNotFoundErrorResponse"
"500":
$ref: "#/components/responses/DBConnectionOrPermissionErrorResponse"
components:
securitySchemes:
GSSAPIAuth:
@ -715,3 +841,13 @@ components:
UserAlreadySubscribedOrNoSuchListErrorResponse:
<<: *ErrorResponse
description: User is already subscribed or mailing list does not exist
DBAlreadyCreatedErrorResponse:
<<: *ErrorResponse
description: User already has a database
InvalidUsernameErrorResponse:
<<: *ErrorResponse
description: Username contains invalid characters
DBConnectionOrPermissionErrorResponse:
<<: *ErrorResponse
description: Unable to connect to database or action failed due to permissions

File diff suppressed because one or more lines are too long