openapi: 3.0.0 info: title: API Title version: '1.0' servers: - url: http://localhost:8080/api paths: /auth/signin: post: operationId: login summary: Anmeldung description: Nutzer meldet sich mit Name und Passwort an tags: - login requestBody: description: Anmeldedaten content: application/json: schema: $ref: '#/components/schemas/LoginRequest' responses: '200': description: Anmeldung erfolgreich content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '401': description: Benutzername/Passwort falsch content: application/json: schema: type: object required: - status - error - message - path additionalProperties: false properties: path: type: string description: Pfad auf den versucht wurde zuzugreifen example: /api/users error: type: string description: Error Cause example: Unauthorized status: type: number description: Statuscode example: 401 /auth/signup: put: operationId: registrate summary: Registierung description: Ein Nutzer registriert sich mit Nutzername, Email und Passwort tags: - login requestBody: description: Anmeldedaten content: 'application/json': schema: $ref: '#/components/schemas/SignUpRequest' responses: '200': description: Registrierung erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 409: description: Nutzer existiert bereits content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" errCode: type: string description: Fehlergrund example: "mail" enum: - "mail" - "username" 403: description: Keine Berechtigung content: application/json: schema: type: object required: - "status" properties: status: type: string description: Status example: "failed" enum: - "failed" /users: get: security: - API_TOKEN: [] tags: - users summary: Alle Nutzer abfragen description: Zeigt alle registerten Nutzer an responses: 200: description: Liste aller registrierten Benutzer content: 'application/json': schema: type: array items: $ref: '#/components/schemas/UserInfo' put: security: - API_TOKEN: [] tags: - users summary: Nutzer hinzufügen description: Fügt einen Nutzer hinzu requestBody: description: Benutzerinformationen content: 'application/json': schema: $ref: '#/components/schemas/UserAddInfo' responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 401: description: Nicht angemeldet 403: description: Keine Berechtigung 409: description: Nutzer existiert bereits content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" errCode: type: string description: Fehlergrund example: "mail" enum: - "mail" - "username" /users/{username}: post: security: - API_TOKEN: [] tags: - users summary: Benutzer ändern description: Ändert einen Benutzer parameters: - name: username in: path description: Benutzername required: true schema: type: string example: Fawkes100 requestBody: description: Benutzerinformationen content: 'application/json': schema: $ref: '#/components/schemas/UserUpdateInfo' responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 401: description: Nicht angemeldet 403: description: Keine Berechtigung 404: description: Falls der Benutzer nicht vorhanden ist delete: security: - API_TOKEN: [] tags: - users summary: Benutzer löschen description: Löscht einen Benutzer parameters: - name: username in: path description: Benutzername required: true schema: type: string example: Fawkes100 responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 401: description: Nicht angemeldet 403: description: Keine Berechtigung 404: description: Falls der Benutzer unbekannt ist /account/change-password: post: security: - API_TOKEN: [] tags: - account summary: Passwort ändern description: Ändert das Passwort requestBody: description: Altes und neues Passwort content: application/json: schema: $ref: "#/components/schemas/PasswordChangeRequest" responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 401: description: Nicht angemeldet 409: description: Nicht angemeldet content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /account/change-email: post: security: - API_TOKEN: [] tags: - account summary: Email ändern description: Ändert die hinterlegte mailadresse requestBody: description: Neue Email und Passwort content: application/json: schema: $ref: "#/components/schemas/EMailChangeRequest" responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 401: description: Nicht angemeldet 409: description: Nicht angemeldet content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /account/user-details: get: security: - API_TOKEN: [] tags: - account summary: Nutzerinformationen description: Fragt Nutzerdetails wie Email ab responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: $ref: '#/components/schemas/UserInfo' 409: description: Invalided Passwort 401: description: Nicht angemeldet /account/delete-request: post: security: - API_TOKEN: [] tags: - account summary: Eigenen Account löschen description: Löscht eigenen Account requestBody: description: Informationen zur Sicherheitsüberprürfung content: 'application/json': schema: $ref: "#/components/schemas/AccountDeleteRequest" responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 409: description: Ungültiges Passwort content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" '401': description: Nicht angemeldet /properties/signup: get: tags: - properties summary: Eigenschaft Registierung abfragen description: Fragt ab, ob Registrierung aktiviert ist responses: 200: description: Operation erfolgreich content: application/json: schema: $ref: '#/components/schemas/PropertyInfo' 404: description: Eigenschaft nicht gefunden content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /settings/update: post: security: - API_TOKEN: [] tags: - properties summary: Eigenschaften aktualisieren description: Aktualisiert Einstellungen requestBody: description: Aktualisierte Einstellungen content: 'application/json': schema: $ref: "#/components/schemas/PropertyUpdateRequest" responses: 200: description: Operation erfolgreich content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 401: description: Nicht angemeldet content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 403: description: Keine Berechtigung content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /settings: get: security: - API_TOKEN: [] tags: - properties summary: Einstellungen auflisten description: Listet Einstellungen auf responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: $ref: '#/components/schemas/PropertiesInfo' 403: description: Keine Berechtigung content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 401: description: Keine Berechtigung content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /taskgroups/all: get: security: - API_TOKEN: [] tags: - taskgroup summary: list all taskgroups of authorized user description: list all taskgroups of authorized user responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: array items: $ref: '#/components/schemas/TaskgroupEntityInfo' /taskgroups: get: security: - API_TOKEN: [] tags: - taskgroup summary: list all top level taskgroups of authorized user description: list all taskgroups of authorized user responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: array items: $ref: '#/components/schemas/TaskgroupEntityInfo' put: security: - API_TOKEN: [] tags: - taskgroup summary: creates taskgroup description: creates taskgroup requestBody: content: application/json: schema: $ref: '#/components/schemas/TaskgroupFieldInfo' responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: $ref: '#/components/schemas/TaskgroupEntityInfo' 409: description: Taskgroup already exists content: application/json: schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /taskgroups/{taskgroupID}: get: security: - API_TOKEN: [] tags: - taskgroup summary: get details of an existing taskgroup description: get details of an existing taskgroup parameters: - name: taskgroupID in: path description: internal id of taskgroup required: true schema: type: number example: 1 responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: array items: $ref: '#/components/schemas/TaskgroupEntityInfo' 403: description: No permission content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 404: description: Taskgroup does not exist content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" post: security: - API_TOKEN: [] tags: - taskgroup summary: edits taskgroup description: edits taskgroup parameters: - name: taskgroupID in: path description: internal id of taskgroup required: true schema: type: number example: 1 requestBody: content: application/json: schema: $ref: '#/components/schemas/TaskgroupFieldInfo' responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 403: description: No permission content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 404: description: Taskgroup does not exist content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 409: description: Taskgroup with that new name already exists content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" delete: security: - API_TOKEN: [] tags: - taskgroup summary: deletes taskgroup description: deletes taskgroup parameters: - name: taskgroupID in: path description: internal id of taskgroup required: true schema: type: number example: 1 responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "success" enum: - "success" 403: description: No permission content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 404: description: Taskgroup does not exist content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /tasks/{taskgroupID}/{status}: get: security: - API_TOKEN: [] tags: - task summary: list tasks description: list tasks parameters: - name: taskgroupID in: path description: internal id of taskgroup required: true schema: type: number example: 1 - name: status in: path description: scope of listed tasks required: true schema: type: string enum: - all - overdue - upcoming example: all responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: array items: $ref: '#/components/schemas/TaskEntityInfo' 403: description: No permission content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 404: description: Taskgroup does not exist content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" /tasks/{taskgroupID}: put: security: - API_TOKEN: [] tags: - task summary: creates a new task description: creates tasks parameters: - name: taskgroupID in: path description: internal id of taskgroup required: true schema: type: number example: 1 requestBody: content: application/json: schema: $ref: '#/components/schemas/TaskFieldInfo' responses: 200: description: Anfrage erfolgreich content: 'application/json': schema: type: object $ref: '#/components/schemas/TaskEntityInfo' 403: description: No permission content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 404: description: Taskgroup does not exist content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" 409: description: Task already exist content: 'application/json': schema: type: object required: - status properties: status: type: string description: Status example: "failed" enum: - "failed" components: securitySchemes: API_TOKEN: type: http scheme: bearer bearerFormat: JWT schemas: LoginRequest: required: - username - password additionalProperties: false properties: username: type: string description: Benutzername des Users example: user password: type: string description: Password des Users example: pa$$word format: password LoginResponse: required: - status additionalProperties: true properties: status: type: string description: Status example: successfull jwt: type: string description: JWT Token example: jwttoken UserAddInfo: required: - username - email - password - admin additionalProperties: false properties: username: type: string description: Benutzername example: "FawKes100" email: type: string description: "Mailadresse" example: "mail@fawkes100.de" format: "email" password: type: string description: Passwort example: "pa$$word" format: password admin: type: boolean description: Adminstatus example: true SignUpRequest: required: - username - email - password additionalProperties: false properties: username: type: string description: Benutzername example: "FawKes100" email: type: string description: "Mailadresse" example: "mail@fawkes100.de" format: "email" password: type: string description: Passwort example: "pa$$word" format: password UserInfo: required: - username - email - admin additionalProperties: false properties: username: type: string description: Benutzername example: "covvacmap" email: type: string description: "Mailadresse" example: mail@fawkes100.de admin: type: boolean description: Adminrechte erteilt example: true UserUpdateInfo: description: Felder eines Benutzers die zu ändern sind additionalProperties: false properties: password: type: string description: Zu setzendes Password des Nutzers example: "Pa$$word" admin: type: boolean description: Adminrechte erteilt example: true email: type: string description: "Email-Adresse des Nutzers" example: mail@fawkes100.de PasswordChangeRequest: required: - oldPassword - newPassword additionalProperties: false properties: oldPassword: type: string description: Bisheriges Passwort des Nutzers example: "Pa$$word1" newPassword: type: string description: Neues Passwort des Nutzers example: "Pa$$word" EMailChangeRequest: required: - password - email additionalProperties: false properties: password: type: string description: Passwort des Nutzers zu Sicherheitsüberpürfung example: "Pa$$word1" email: type: string description: Zusetzende Emailadresse des Nutzers example: test@fawkes100.de AccountDeleteRequest: required: - password additionalProperties: false properties: password: type: string description: Passwort zur Sicherheitsüberprürfung example: "Pa$$word1" PropertyInfo: required: - property - status additionalProperties: false properties: property: type: string description: Name der Eigenschaft example: "Registration disabled" status: type: boolean description: Zustand der Eigenschaft example: false PropertyUpdateRequest: required: - settings additionalProperties: false properties: settings: type: array items: $ref: '#/components/schemas/PropertyInfo' PropertiesInfo: required: - settings additionalProperties: false properties: settings: type: array items: $ref: '#/components/schemas/PropertyInfo' TaskgroupEntityInfo: required: - taskgroupID - taskgroupName - parentTaskgroup additionalProperties: false properties: taskgroupID: type: number description: internal id of taskgroup example: 1 taskgroupName: type: string description: name of taskgroup example: Taskgroup 1 maxLength: 255 minLength: 1 parentTaskgroup: type: object $ref: '#/components/schemas/TaskgroupEntityInfo' TaskgroupFieldInfo: required: - name - parentID additionalProperties: false properties: name: type: string description: name of taskgroup example: Taskgroup 1 maxLength: 255 minLength: 1 parentID: type: number description: internal id of parent Taskgroup example: 1 TaskEntityInfo: required: - taskID - taskName - eta - startDate - deadline - overdue additionalProperties: false properties: taskID: type: number description: internal id of task example: 1 taskName: type: string description: name of task example: Vorlesung schauen eta: type: number description: expected time to finish task example: 10 minimum: 0 startDate: type: string format: date description: date from which the task can be started deadline: type: string format: date description: date until the task has to be finished overdue: type: boolean description: determines whether the task is overdue example: True TaskFieldInfo: required: - taskName - eta - startDate - deadline additionalProperties: false properties: taskName: type: string description: name of task example: Vorlesung schauen eta: type: number description: expected time to finish task example: 10 minimum: 0 startDate: type: string format: date description: date from which the task can be started deadline: type: string format: date description: date until the task has to be finished