-
Notifications
You must be signed in to change notification settings - Fork 0
API
In the following article, the API is documented.
The attribute role definies, which User-Role can access the individual interface.
Register a new user
administrator
{
"username":"username",
"password":"password",
"role":"student"|"teacher"|"administrator",
"fullname":"fullname",
"address":"address",
"matriculationNumber":"matriculationNumber",
"mail":"[email protected]"
}
It may be noticed, that the role will default to student, if none of the role listed above is used.
On success returns the HTTP-Status 200.
On failure returns the HTTP-Status 403.
Try to login a user
Unauthenticated users
{
"username":"username",
"password":"password
}
On success returns the HTTP-Status 200 and a JWT for authentication.
On failure returns the HTTP-Status 403 and the message Wrong username or password.
Deletes a user from the repository
administrator
{
"username":"username"
}
On success returns the HTTP-Status 200 and the message The user has been deleted.
On failure returns the HTTP-Status 500 and the message The user could not be deleted.
Change the password of the given user
student & teacher may only change their own password.
administrator may change their own password as the password of other users.
{
"username":"username",
"password":"password
}
On success returns the HTTP-Status 200 and the message The password has been changed.
On failure returns the HTTP-Status 500 and the message Password could not be changed.