*/authentication/register |
POST |
- mail: The users mail address
- password: The users password (must already be hashed!)
- name: The users last name
- prename: The users fore name
|
- user already exists: The given mail address is already in use
- failed insert into database: There was an internal server error
- invalid mail: The operation was successful
- check: The operation was successful
|
*/authentication/login |
POST |
- mail: The users mail address
- password: The users password (must already be hashed!)
|
- no such user: There exists no Account with the given mail address
- failed to log in: There was an internal server error
- {sessionID}: The login was successful, the session ID is returned
|
*/authentication/logout |
POST |
- session: The session ID of the current session
|
- failed authentication: There is no user with the given session ID logged in
- Check: Logout was successful
- fail: There was an internal server error
|
*/account/info |
POST |
- session: The session ID of the current session
|
- failed authentication: The given mail address is already in use
- {user}: A User Object in String representation with information such as pre(name), mail, Amount due
|
*/account/admin |
POST |
- session: The session ID of the current session
|
- True: The user is an Admin
- False: The user is no Admin
|
*/account/mail |
POST |
- session: The session ID of the current session
- mail: The mail address of the user to send the mail to
|
- Failed authentication: Authentication process failed
- Access denied: The Access was denied (User is no Admin)
- fail: Failed to generate the bill (no mail was sent)
- Mail sent: The mail was sent and a bill was generated
- Failed to send mail: The mail was not sent, the generated bill deleted again
|
*/account/adminlist |
POST |
- session: The session ID of the current session
|
- Failed authentication: Authentication process failed
- Access denied: The Access was denied (User is no Admin)
- {List}: A ArrayList of Users in String representation. Contains information such as pre(name), mail, Amount due.
|
*/account/password |
POST |
- session: The session ID of the current session
- password: The new password (must be hashed already!)
|
- Failed authentication: Authentication process failed
- check: The password was successfully changed
- fail: Could not change the password
|
*/account/bill |
POST |
- session: The session ID of the current session
|
- Failed authentication: Authentication process failed
- Access denied: The Access was denied (User is no Admin!)
- database error: An internal server error
- {List}: A List of all Bills in String representation
|
*/account/confirm |
POST |
- session: The session ID of the current session
- id: The id of the bill which will be confirmed
|
- Failed authentication: Authentication process failed
- Access denied: The Access was denied (User is no Admin!)
- fail: Failed to confirm the bill
- check: The bill was deleted, all connected History entries set to payed
|
*/booking |
POST |
- session: The session ID of the current session
- code: The product code
|
- Failed authentication: Authentication process failed
- fail: Failed to book the wanted product
- check: The product was booked, a History entry created
|
*/booking/add |
POST |
- session: The session ID of the current session
- code: The product code
- name: The product name
- price: The product price
|
- failed authentication: Authentication process failed
- Access denied: User is no Admin!
- code already in use: There is a product with the given code already registered
- fail: Internal server error
- check: The product was created
|
*/booking/change |
POST |
- session: The session ID of the current session
- codeNew: The new product code
- nameNew: The new product name
- priceNew: The new product price
- codeOld: The old product code
- nameOld: The old product name
- priceOld: The old product price
|
- failed authentication: Authentication process failed
- Access denied: User is no Admin!
- code already in use: There is a product with the new code already registered
- fail: Internal server error
- check: The product was changed
|
*/booking/delete |
POST |
- session: The session ID of the current session
- code: The product code
|
- failed authentication: Authentication process failed
- Access denied: User is no Admin!
- fail: Internal server error
- check: The product was deleted
|
*/content/img/{name} |
GET |
- {name}: The files name and filetype (for example abc.png)
|
- error 404: No such file could be found
- the file: The file as attachment(download)
|
*/content/css/{name} |
GET |
- {name}: The files name and filetype (for example server.css)
|
- error 404: No such file could be found
- the file: The file as attachment(download)
|
*/search/product/nameOrCode |
POST |
- nameOrCode: The code or the name of the product to search. If left empty it lists all products
|
- list: A list of products matching the search values
|
*/search/product/{name}/code/{code} |
GET |
- {name}: The name of the product to search
- {code}: The barcode of the product to search
|
- list: A list of products matching the search values
|
*/search/history/{limit} |
POST |
- {limit}: The number of History entries to be listed
- session: The current users session id
|
- list: A list of History entries of the user linked to the session id
|
*/user/mail |
POST |
- mail: The mail address of the user to search for
- session: The current users session id (must be admin!)
|
- list: A list of Users linked to the given mail address
|
*/user/name |
POST |
- name: The name of the user to search for
- session: The current users session id (must be admin!)
|
- list: A list of Users with the given name as prename or lastname
|
*/user/delete |
POST |
- mail: The mail address of the user to delete
- session: The current users session id (must be admin!)
|
- Failed Authentication: The session id is invalid.
- Access denied: The current user has no permission to access this method
- open bills: The user to delete has open bills
- check: The user was successfully deleted
- fail: An unexpected internal error occured/li>
|