1912 lines
52 KiB
YAML
1912 lines
52 KiB
YAML
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: object
|
|
$ref: '#/components/schemas/TaskgroupDetailInfo'
|
|
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"
|
|
/taskgroups/{taskgroupID}/clear:
|
|
delete:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- taskgroup
|
|
summary: clears tasks
|
|
description: Deletes all tasks of that 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
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/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"
|
|
/tasks/{taskID}:
|
|
post:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- task
|
|
summary: edits an existing task
|
|
description: edits an existing task
|
|
parameters:
|
|
- name: taskID
|
|
in: path
|
|
description: internal id of task
|
|
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"
|
|
delete:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- task
|
|
summary: edits an existing task
|
|
description: edits an existing task
|
|
parameters:
|
|
- name: taskID
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
responses:
|
|
200:
|
|
description: Anfrage erfolgreich
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
get:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- task
|
|
summary: gets taskdetails
|
|
description: loads information about a given task
|
|
parameters:
|
|
- name: taskID
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
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
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/schedules:
|
|
get:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: gets all schedules of user
|
|
summary: gets all schedules of user
|
|
responses:
|
|
200:
|
|
description: request successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/ScheduleInfo'
|
|
|
|
/schedules/{taskID}/{scheduleType}:
|
|
get:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: gets schedules of task
|
|
summary: gets schedules of task
|
|
parameters:
|
|
- name: taskID
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
- name: scheduleType
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum:
|
|
- BASIC
|
|
- MODERATE
|
|
- ADVANCED
|
|
responses:
|
|
200:
|
|
description: operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/BasicScheduleEntityInfo'
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/schedules/{taskID}/basic:
|
|
put:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: creates a basic schedule for a task
|
|
summary: creates basic schedule for task
|
|
parameters:
|
|
- name: taskID
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BasicScheduleFieldInfo'
|
|
responses:
|
|
200:
|
|
description: operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
$ref: '#/components/schemas/BasicScheduleEntityInfo'
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/schedules/{scheduleID}/basic:
|
|
post:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: reschedules a task
|
|
summary: reschedules task
|
|
parameters:
|
|
- name: scheduleID
|
|
in: path
|
|
description: internal id of schedule
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BasicScheduleFieldInfo'
|
|
responses:
|
|
200:
|
|
description: operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
$ref: '#/components/schemas/SimpleStatusResponse'
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/schedules/{scheduleID}/{scheduleType}:
|
|
delete:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: deletes a schedule
|
|
summary: deletes schedule
|
|
parameters:
|
|
- name: scheduleID
|
|
in: path
|
|
description: internal id of schedule
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
- name: scheduleType
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: string
|
|
enum:
|
|
- BASIC
|
|
- MODERATE
|
|
- ADVANCED
|
|
responses:
|
|
200:
|
|
description: operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
$ref: '#/components/schemas/SimpleStatusResponse'
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/schedules/today:
|
|
get:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: get all schedules of today
|
|
summary: get today's schedules
|
|
responses:
|
|
200:
|
|
description: Operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/ScheduleInfo'
|
|
/schedules/{taskID}/now:
|
|
post:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: schedule task now
|
|
summary: schedule task now
|
|
parameters:
|
|
- name: taskID
|
|
in: path
|
|
description: internal id of task
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
responses:
|
|
200:
|
|
description: Operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
$ref: '#/components/schemas/BasicScheduleEntityInfo'
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Taskgroup does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
409:
|
|
description: Task is already running
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
/schedules/active:
|
|
get:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: get active schedule
|
|
summary: get active schedule
|
|
responses:
|
|
200:
|
|
description: operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ScheduleInfo'
|
|
404:
|
|
description: there is no active schedule
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/SimpleStatusResponse'
|
|
/schedules/{scheduleID}/activate:
|
|
post:
|
|
security:
|
|
- API_TOKEN: []
|
|
tags:
|
|
- schedule
|
|
description: activates schedule
|
|
summary: activates schedule
|
|
parameters:
|
|
- name: scheduleID
|
|
in: path
|
|
description: internal id of schedule
|
|
required: true
|
|
schema:
|
|
type: number
|
|
example: 1
|
|
responses:
|
|
200:
|
|
description: Operation successfull
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
$ref: '#/components/schemas/ScheduleActivateInfo'
|
|
403:
|
|
description: No permission
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
404:
|
|
description: Schedule does not exist
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
409:
|
|
description: Task is already running
|
|
content:
|
|
'application/json':
|
|
schema:
|
|
type: object
|
|
$ref: "#/components/schemas/SimpleStatusResponse"
|
|
|
|
|
|
|
|
components:
|
|
securitySchemes:
|
|
API_TOKEN:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|
|
schemas:
|
|
SimpleStatusResponse:
|
|
required:
|
|
- status
|
|
additionalProperties: false
|
|
properties:
|
|
status:
|
|
type: string
|
|
description: Response Status der Request
|
|
example: "failed"
|
|
enum:
|
|
- success
|
|
- failed
|
|
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
|
|
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
|
|
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
|
|
TaskgroupDetailInfo:
|
|
required:
|
|
- children
|
|
- ancestors
|
|
- taskgroupInfo
|
|
additionalProperties: false
|
|
properties:
|
|
children:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/TaskgroupEntityInfo'
|
|
ancestors:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/TaskgroupEntityInfo'
|
|
taskgroupInfo:
|
|
type: object
|
|
$ref: '#/components/schemas/TaskgroupEntityInfo'
|
|
TaskEntityInfo:
|
|
required:
|
|
- taskID
|
|
- taskName
|
|
- eta
|
|
- startDate
|
|
- deadline
|
|
- overdue
|
|
- finished
|
|
- workTime
|
|
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
|
|
finished:
|
|
type: boolean
|
|
description: determines whether the task is finished
|
|
example: True
|
|
workTime:
|
|
type: number
|
|
description: number in minutes that was already worked on this task
|
|
example: 10
|
|
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
|
|
BasicScheduleEntityInfo:
|
|
required:
|
|
- scheduleID
|
|
- scheduleDate
|
|
additionalProperties: false
|
|
properties:
|
|
scheduleID:
|
|
type: number
|
|
description: internal id of schedule
|
|
example: 1
|
|
scheduleDate:
|
|
type: string
|
|
format: date
|
|
description: date on which the task is scheduled
|
|
startTime:
|
|
type: string
|
|
format: date-time
|
|
description: date on which the task schedule was started
|
|
finishedTime:
|
|
type: string
|
|
format: date-time
|
|
description: date on which the tasks schedule was finished
|
|
activeTime:
|
|
type: number
|
|
description: number in minutes that the schedule was active
|
|
example: 10
|
|
BasicScheduleFieldInfo:
|
|
required:
|
|
- scheduleDate
|
|
additionalProperties: false
|
|
properties:
|
|
scheduleDate:
|
|
type: string
|
|
format: date
|
|
description: date on which the task is scheduled
|
|
ScheduleInfo:
|
|
required:
|
|
- scheduleID
|
|
- scheduleType
|
|
- startTime
|
|
- finishTime
|
|
- activeMinutes
|
|
- schedule
|
|
- task
|
|
- taskgroupPath
|
|
additionalProperties: false
|
|
properties:
|
|
scheduleID:
|
|
type: number
|
|
description: internal id of schedule
|
|
example: 1
|
|
scheduleType:
|
|
type: string
|
|
description: type of schedule
|
|
example: BASIC
|
|
enum:
|
|
- BASIC
|
|
- MODERATE
|
|
- ADVANCED
|
|
startTime:
|
|
type: string
|
|
format: date-time
|
|
description: date on which the task schedule was started
|
|
finishedTime:
|
|
type: string
|
|
format: date-time
|
|
description: date on which the tasks schedule was finished
|
|
activeMinutes:
|
|
type: number
|
|
description: number in minutes that the schedule was active
|
|
example: 10
|
|
schedule:
|
|
type: object
|
|
oneOf:
|
|
- $ref: '#/components/schemas/BasicScheduleFieldInfo'
|
|
task:
|
|
type: object
|
|
$ref: '#/components/schemas/TaskShortInfo'
|
|
taskgroupPath:
|
|
type: array
|
|
items:
|
|
$ref: '#/components/schemas/TaskgroupEntityInfo'
|
|
|
|
TaskShortInfo:
|
|
required:
|
|
- taskID
|
|
- taskName
|
|
additionalProperties: false
|
|
properties:
|
|
taskID:
|
|
type: number
|
|
description: internal id of task
|
|
example: 1
|
|
taskName:
|
|
type: string
|
|
description: name of task
|
|
example: "Vorlesung zusammenfassen"
|
|
ScheduleActivateInfo:
|
|
required:
|
|
- startTime
|
|
additionalProperties: false
|
|
properties:
|
|
startTime:
|
|
type: string
|
|
format: date-time
|
|
description: point in time at which the schedule was started |