timemanager/openapi.yaml

2348 lines
64 KiB
YAML
Raw Normal View History

2023-09-25 11:01:28 +02:00
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"
2023-10-01 21:22:04 +02:00
/taskgroups/all:
2023-09-25 12:01:24 +02:00
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/tree:
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/RecursiveTaskgroupInfo'
2023-10-01 21:22:04 +02:00
/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'
2023-09-25 12:01:24 +02:00
put:
security:
- API_TOKEN: []
tags:
- taskgroup
summary: creates taskgroup
description: creates taskgroup
2023-09-25 12:46:45 +02:00
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TaskgroupFieldInfo'
2023-09-25 12:01:24 +02:00
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}:
2023-10-01 21:22:04 +02:00
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:
2023-10-22 11:39:25 +02:00
type: object
$ref: '#/components/schemas/TaskgroupDetailInfo'
2023-10-01 21:22:04 +02:00
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"
2023-09-25 12:01:24 +02:00
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
2023-09-25 12:46:45 +02:00
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TaskgroupFieldInfo'
2023-09-25 12:01:24 +02:00
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"
2023-10-22 10:08:44 +02:00
/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/all/{scope}/{detailed}:
2023-10-29 09:47:57 +01:00
get:
security:
- API_TOKEN: []
tags:
- task
summary: edits an existing task
description: edits an existing task
parameters:
- name: scope
2023-10-29 09:47:57 +01:00
in: path
description: defines scope of fetched tasks
2023-10-29 09:47:57 +01:00
required: true
schema:
type: string
enum:
- FINISHED
- UNFINISHED
- OVERDUE
2023-10-29 17:20:24 +01:00
- UPCOMING
- ACTIVE
- name: detailed
in: path
description: determines whether an detailed response is required or not
required: true
schema:
2023-10-29 09:47:57 +01:00
type: boolean
example: true
responses:
200:
description: Operation successfull
content:
application/json:
schema:
oneOf:
- type: array
items:
$ref: '#/components/schemas/TaskShortInfo'
- type: array
items:
2023-10-29 16:03:58 +01:00
$ref: '#/components/schemas/TaskTaskgroupInfo'
2023-10-29 09:47:57 +01:00
2023-10-02 10:35:02 +02:00
/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'
2023-10-22 01:10:52 +02:00
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'
2023-10-02 10:35:02 +02:00
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"
2023-10-22 10:08:44 +02:00
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"
2023-10-22 20:42:57 +02:00
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:
2023-10-28 18:29:34 +02:00
'application/json':
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
/tasks/{taskID}/finish:
post:
security:
- API_TOKEN: []
tags:
- task
summary: finishs task
description: finish tasks
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:
2023-10-22 20:42:57 +02:00
'application/json':
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
2023-10-23 21:35:42 +02:00
/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}:
2023-10-22 20:42:57 +02:00
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
responses:
200:
description: operation successfull
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ScheduleInfo'
2023-10-22 20:42:57 +02:00
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"
2023-10-23 19:56:16 +02:00
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/ScheduleInfo'
2023-10-23 19:56:16 +02:00
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}:
2023-10-23 21:35:42 +02:00
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/ScheduleInfo'
2023-10-23 21:35:42 +02:00
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"
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
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/{date}/{startable}:
get:
security:
- API_TOKEN: []
tags:
- schedule
description: get all schedules of today
summary: get today's schedules
2023-10-26 09:40:36 +02:00
parameters:
- name: date
in: path
description: determines the scheduled dates of the schedules
required: true
schema:
type: string
format: date
nullable: true
- name: startable
2023-10-26 09:40:36 +02:00
in: path
description: determines whether only schedules that can be started should be included or all schedules of today
required: true
schema:
type: boolean
example: true
responses:
200:
description: Operation successfull
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ScheduleInfo'
2023-10-24 19:58:12 +02:00
/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/ScheduleInfo'
2023-10-24 19:58:12 +02:00
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"
2023-10-26 09:40:36 +02:00
/schedules/{scheduleID}/stop/{finish}:
post:
security:
- API_TOKEN: []
tags:
- schedule
parameters:
- name: scheduleID
in: path
description: internal id of schedule
required: true
schema:
type: number
example: 1
- name: finish
in: path
description: internal id of schedule
required: true
schema:
type: boolean
example: True
responses:
200:
description: No permission
content:
'application/json':
schema:
type: object
$ref: "#/components/schemas/TaskScheduleStopResponse"
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"
400:
description: Operation not valid
content:
'application/json':
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
/schedules/status/today:
get:
security:
- API_TOKEN: []
tags:
- schedule
description: get number of worked minutes today
summary: get number of active minutes
responses:
200:
description: operation successfull
content:
application/json:
schema:
$ref: '#/components/schemas/ScheduleStatus'
404:
description: User not found
content:
'application/json':
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
2023-10-29 09:47:57 +01:00
/schedules/{taskID}/forgotten:
post:
security:
- API_TOKEN: []
tags:
- schedule
description: Registers forgotten schedule
summary: registers forgotten schedule
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/ForgottenActivityRequest'
responses:
200:
description: Operation successfull
content:
application/json:
schema:
$ref: '#/components/schemas/TaskScheduleStopResponse'
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"
400:
description: Operation not valid
content:
'application/json':
schema:
type: object
$ref: "#/components/schemas/SimpleStatusResponse"
2023-10-29 10:16:08 +01:00
/schedules/missed:
get:
security:
- API_TOKEN: []
tags:
- schedule
description: Registers forgotten schedule
summary: registers forgotten schedule
responses:
200:
description: Operation successfull
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ScheduleInfo'
403:
description: User not found/No permission
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleStatusResponse'
2023-10-29 11:16:48 +01:00
/schedules/{scheduleIDs}/all:
delete:
security:
- API_TOKEN: []
tags:
- schedule
description: deletes multiple schedules at once
summary: deletes multiple schedules
parameters:
- name: scheduleIDs
in: path
description: internal ids of schedules to delete
required: true
schema:
type: array
items:
type: number
responses:
200:
description: Operation successfull
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SimpleStatusResponse'
403:
description: No permission
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleStatusResponse'
404:
description: Schedule not found
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleStatusResponse'
2023-09-25 11:01:28 +02:00
components:
securitySchemes:
API_TOKEN:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
2023-10-22 10:08:44 +02:00
SimpleStatusResponse:
required:
- status
additionalProperties: false
properties:
status:
type: string
description: Response Status der Request
example: "failed"
enum:
- success
- failed
2023-09-25 11:01:28 +02:00
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:
2023-09-25 12:01:24 +02:00
$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
2023-10-01 21:22:04 +02:00
- parentID
2023-09-25 12:01:24 +02:00
additionalProperties: false
properties:
name:
type: string
description: name of taskgroup
example: Taskgroup 1
maxLength: 255
2023-10-01 21:22:04 +02:00
minLength: 1
parentID:
type: number
description: internal id of parent Taskgroup
example: 1
2023-10-22 11:39:25 +02:00
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'
2023-10-02 10:35:02 +02:00
TaskEntityInfo:
required:
- taskID
- taskName
- eta
- startDate
- deadline
- overdue
2023-10-22 10:08:44 +02:00
- finished
- workTime
2023-10-02 10:35:02 +02:00
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
2023-10-22 10:08:44 +02:00
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
2023-10-29 16:03:58 +01:00
TaskTaskgroupInfo:
required:
- taskID
- taskName
- eta
- startDate
- deadline
- overdue
- finished
- workTime
- taskgroups
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
taskgroups:
type: array
items:
$ref: '#/components/schemas/TaskgroupEntityInfo'
2023-10-02 10:35:02 +02:00
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
2023-10-22 20:42:57 +02:00
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
2023-10-22 20:42:57 +02:00
BasicScheduleFieldInfo:
required:
- scheduleDate
additionalProperties: false
properties:
scheduleDate:
type: string
format: date
description: date on which the task is scheduled
2023-10-23 21:35:42 +02:00
ScheduleInfo:
required:
- scheduleID
- scheduleType
- startTime
- finishTime
- activeMinutes
- task
- taskgroupPath
2023-10-23 21:35:42 +02:00
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
task:
type: object
$ref: '#/components/schemas/TaskShortInfo'
taskgroupPath:
type: array
items:
$ref: '#/components/schemas/TaskgroupEntityInfo'
BasicScheduleInfo:
allOf:
- $ref: '#/components/schemas/ScheduleInfo'
- type: object
required:
- scheduleDate
additionalProperties: false
properties:
scheduleDate:
type: string
format: date
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
2023-10-26 09:40:36 +02:00
description: point in time at which the schedule was started
TaskScheduleStopResponse:
required:
- workTime
additionalProperties: false
properties:
workTime:
type: number
description: time where the schedule was active
example: 10
RecursiveTaskgroupInfo:
required:
- taskgroupID
- taskgroupName
- childTaskgroups
- activeTasks
2023-10-28 12:02:00 +02:00
- hasOverdueTask
- amountActiveTasks
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
childTaskgroups:
type: array
items:
$ref: '#/components/schemas/RecursiveTaskgroupInfo'
activeTasks:
type: array
items:
$ref: '#/components/schemas/TaskOverviewInfo'
2023-10-28 12:02:00 +02:00
hasOverdueTask:
type: boolean
example: true
description: determines whether the taskgroup has an overdue task or not
amountActiveTasks:
type: number
example: 2
description: determines the number of active tasks that can be scheduled
TaskOverviewInfo:
required:
- taskID
- taskName
- activeMinutes
- eta
- limit
- 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
limit:
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
activeTime:
type: number
description: number in minutes that was already worked on this task
example: 10
ScheduleStatus:
required:
- activeMinutes
- missedSchedules
additionalProperties: false
properties:
activeMinutes:
type: number
example: 1
description: number of minutes it was worked today
missedSchedules:
type: boolean
description: states whether a schedule was missed or not
2023-10-29 09:47:57 +01:00
example: true
ForgottenActivityRequest:
required:
- startTime
- endTime
2023-10-29 09:47:57 +01:00
additionalProperties: false
properties:
startTime:
2023-10-29 09:47:57 +01:00
type: string
format: date
description: time the schedule was started
endTime:
type: string
format: date
description: time the schedule was stopped
2023-10-29 10:16:08 +01:00