diff --git a/openapi.yaml b/openapi.yaml new file mode 100644 index 0000000000000000000000000000000000000000..66a639e4ecb8c0122dd94bb59137314473b098e0 --- /dev/null +++ b/openapi.yaml @@ -0,0 +1,118 @@ +openapi: 3.0.3 +info: + title: Activate Account + version: 1.0.0 + description: Activate Account API + contact: + name: UIS DevOps Division + url: https://guidebook.devops.uis.cam.ac.uk/en/latest/ + email: devops@uis.cam.ac.uk +paths: + /: + get: + operationId: root_retrieve + description: Lists the available versions of the API, responding with a dictionary + of version name to the url that version can be accessed at + summary: List API Versions + tags: + - API Versions + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/APIVersions' + description: '' + /token/: + post: + operationId: token_create + tags: + - Token Management + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/TokenRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/TokenResponse' + description: '' + '400': + content: + application/json: + schema: + description: Invalid request, such as both or none of crsid and last + name are provided, or no matching user. + description: '' + '401': + content: + application/json: + schema: + description: Authentication credentials were not provided or are invalid. + description: '' + '403': + content: + application/json: + schema: + description: The user is not authorized to access this resource. + description: '' + /token/revoke/: + post: + operationId: token_revoke_create + tags: + - token + responses: + '200': + description: No response body + /token/revoke/all/: + post: + operationId: token_revoke_all_create + tags: + - token + responses: + '200': + description: No response body +components: + schemas: + APIVersions: + type: object + properties: + v1alpha1: + type: string + required: + - v1alpha1 + TokenRequest: + type: object + properties: + grant_type: + type: string + crsid: + type: string + last_name: + type: string + date_of_birth: + type: string + format: date + code: + type: string + required: + - code + - date_of_birth + - grant_type + TokenResponse: + type: object + properties: + expires_in: + type: integer + access_token: + type: string + token_type: + type: string + required: + - access_token + - expires_in + - token_type