REST API
Table of Contents
Meta info
- All responses are JSON objects
/login
POST
Executes a login and gets a token back
Parameters
- username: (required)
- password: (required)
Response
-
200 OK with token (JWT)
-
401 Unauthorized
Wrong username/password combination
Constraints
None
/logout
GET
Logs out the current user
Parameters
None
Response
-
200 OK
-
401 Unauthorized
User is not logged in
Constraints
- User must be logged in
/user
GET
Returns user data of currently logged in user
Parameters
None
Response
- 200 OK with user data
Constrains
- Must be authorized (logged in)
PUT
Update user data of currently logged in user
Parameters
-
data:
application/json
encoded user data object (required)
Response
-
200 OK
User data updated successfully
-
400 Bad Request FIXME
Malformed data, missing data
Constraints
- Must be authorized (logged in)
/join
(optional)
Request to join mittelab
GET
Return the membership application status
Parameters
- joinid: the membership application UUID
Responses
-
200 OK
with membership application status
-
404 Not Found
wrong UUID
Constraints
None
POST
Submit new user
Parameters
- data: new user data
Response
-
200 OK
New user created
-
400 Bad Request FIXME
Malformed data, missing data
Constraints
None