openapi: 3.0.0 info: title: "{NAME} API" description: API for managing chapters, sign categories, and exercise categories version: 1.0.0 servers: - url: https://localhost:{PORT}/api/v1 description: "{NAME} server" paths: /users/{id}: delete: summary: Delete a user by ID tags: [Users] servers: - url: https://localhost:{PORT}/api/v1 security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID of the user to delete responses: '204': description: User deleted successfully '400': description: Bad Request '401': description: Unauthorized '403': description: Forbidden '500': description: Internal Server Error /users/{id}/progress: delete: summary: Reset a user's progress tags: [Users] servers: - url: https://localhost:{PORT}/api/v1 security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID of the user whose progress is being reset responses: '204': description: User progress reset successfully '400': description: Bad Request '401': description: Unauthorized '403': description: Forbidden '500': description: Internal Server Error /users/{id}/banned: patch: summary: Update the banned status of a user tags: [Users] servers: - url: https://localhost:{PORT}/api/v1 security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer description: ID of the user to update requestBody: required: true content: application/json: schema: type: object properties: banned: type: boolean required: - banned responses: '204': description: User banned status updated successfully '400': description: Bad Request '401': description: Unauthorized '403': description: Forbidden '404': description: User not found '500': description: Internal Server Error /leaderboard: get: summary: Get leaderboard entries tags: [Users] servers: - url: https://localhost:{PORT}/api/v1 parameters: - name: start in: query required: false schema: type: integer description: The starting index of the leaderboard, from 0 - name: count in: query required: false schema: type: integer description: The number of entries to return responses: '200': description: A list of leaderboard entries content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: integer username: type: string solvedQuestionnaires: type: integer totalQuestionnaires: type: integer solvedQuestions: type: integer totalQuestions: type: integer total: type: integer '500': description: Internal server error /leaderboard/rss: get: summary: Retrieve RSS feed for leaderboard tags: [Users] servers: - url: https://localhost:{PORT}/api/v1 description: | Retrieves an RSS feed containing leaderboard data. responses: '200': description: Successful response content: application/rss+xml: schema: type: string format: utf-8 '500': description: Internal server error /users: get: summary: Get leaderboard entries tags: [Users] servers: - url: https://localhost:{PORT}/api/v1 security: - cookieAuth: [] parameters: - name: start in: query required: false schema: type: integer description: The starting index of the users, from 0 - name: count in: query required: false schema: type: integer description: The number of entries to return - name: query in: query required: false schema: type: string description: A search query for users responses: '200': description: A list of leaderboard entries content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: integer username: type: string email: type: string updatedAt: type: string solvedQuestionnaires: type: integer totalQuestionnaires: type: integer solvedQuestions: type: integer totalQuestions: type: integer flags: type: integer total: type: integer '400': description: Bad Request '401': description: Unauthorized '404': description: User not found '500': description: Internal Server Error components: securitySchemes: cookieAuth: type: apiKey in: cookie name: TW-RoT-Auth-Cookie