try ToC
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 17:01:54 +11:00
parent d8b68f2815
commit 1bb983b4b9
3 changed files with 7 additions and 9 deletions

View File

@@ -76,10 +76,10 @@ ExecStart=/srv/smt/smt
[Install]
WantedBy=multi-user.target
```
## API
## API Usage
### Login
POST `/api/login`
**POST** `/api/login`
Data
```
@@ -91,7 +91,7 @@ Data
This API call will return a JWT token that must be present for any other API calls to succeed. The validity duration of this token is based on the configured TOKEN_HOUR_LIFESPAN value. JWT token is returned as value of `access_token`, and must be supplied via a HTTP header in the form `"Authorization: Bearer <JWT_TOKEN>"` for all subsequent API calls.
### Unlock
POST `/api/admin/unlock`
**POST** `/api/admin/unlock`
Data
```
@@ -107,7 +107,7 @@ This API call can only be made once after the service has started. Subsequent ca
### User Operations
#### Register User
POST `/api/admin/user/add`
**POST** `/api/admin/user/add`
Create a new user record by specifying groupId
Body
@@ -134,7 +134,7 @@ Registering a user requires specifying the group to which the user will belong.
This operation can only be performed by a user that is a member of a group with the admin flag enabled, or a user who has the admin flag enabled individually on their database record.
#### Remove User
POST `/api/admin/user/delete`
**POST** `/api/admin/user/delete`
Data
```