- This serves as an API for a mobile application for ticket verification via a QR code and for a web administration
- Below are provided methods with corresponding input and output values
- Api should run in a provided docker container with https and is BY NO MEANS SECURE as it uses http as communication with outside of it
- All the authentication must be done by other means, this only uses forwarded basic-auth packets for user-table assignment
- Use of https for communication with the server on the internet is highly recommended (maybe even mandatory)
- This api is definitely not 100% bug-free
- Requirements for python must be met and only Python3 is (and will be) supported
- Api requires all the provided folders to be present in order to function properly
- Do not expose this api (or folder with the code) directly to the outside
- creates a new table for ticket codes
input format:
{
"table_name": "",
"size": ""
}- deletes a table containing ticket codes
input format:
{
"table_name": ""
}- backs up databases with codes and assigned users into a zip file
input format:
{}- restores databases from a zip backup
input format:
{
"filepath": ""
}- clears a given table of codes
input format:
{
"table_name": ""
}
- adds n codes into a table
- codes are generated based on the internal parameters
input format:
{
"table_name": "",
"code": ""
}- returns a row with matching code from a table
input format:
{
"table_name": "",
"code": ""
}output format:
{
"id": "",
"code": "",
"used": "",
"time": ""
}- updates a code to current time and increments used count
- returns values pre-update
input format:
{
"table_name": "",
"code": ""
}output format:
{
"id": "",
"code": "",
"used": "",
"time": ""
}- adds users from a list into the assingment table and assigns them to table_name
input format:
{
"table_name": "",
"users": ""
}- deletes all users from assignment table
input format:
{}- deletes all users from assginment table assigned to a specific table
input format:
{
"table_name": ""
}- returns name of a table the specified user is assigned to
input format:
{
"user": ""
}output format:
{
"table_name": ""
}- exports tickets from a table to a file and provides the download link for it
- currently only supports HTML (printing to pdf on client side browser) and one template with 8 codes
- TODO: accidentally removed after fedora update completely ruined itself and grub :( (forgot to push) -> restore previous state where printing was to a pdf instead of html
input format:
{
"table_name": ""
}output format:
{
"id": "",
"code": "",
"used": "",
"time": ""
}WORK IN PROGRESS