add readme
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
# Pager Middleware
|
||||
|
||||
API zwischen mehreren [Pager Remote Systemen](https://git.tservic.es/rg/esp32-pager) und der Mgmt Software
|
||||
|
||||
Howto:
|
||||
|
||||
- `git clone https://git.tservic.es/rg/pager-middleware`
|
||||
- `cd pager-middleware`
|
||||
- `python3 -m venv .venv`
|
||||
- `source .venv/bin/activate`
|
||||
- `pip3 install -r requirements.txt`
|
||||
- `cp config.example.yaml config.yaml`
|
||||
- `vim config.yaml`
|
||||
- `python3 app.py`
|
||||
...
|
||||
- PROFIT
|
||||
|
||||
API Endpoints:
|
||||
|
||||
### `/api/page`
|
||||
|
||||
Type: `POST`
|
||||
|
||||
Authentication: `Bearer Token`
|
||||
|
||||
Content: `Pager ID` / `ALL`
|
||||
|
||||
Response:
|
||||
- `PAGERNOTIFIED`
|
||||
- success
|
||||
- `PAGERNOTFOUND`
|
||||
- failure (pager not found)
|
||||
- `ERROR`
|
||||
- failure (diverse)
|
||||
|
||||
### `/api/shutdown`
|
||||
|
||||
Type: `POST`
|
||||
|
||||
Authentication `Bearer Token`
|
||||
|
||||
Content ``
|
||||
|
||||
Response:
|
||||
- `PAGERNOTIFIED`
|
||||
- shutdown signal send
|
||||
- `ERROR`
|
||||
- failure (diverse)
|
||||
|
||||
## Example Call
|
||||
|
||||
`curl -s -w "DNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n" http://127.0.0.1:5500/api/page -H "Authorization: Bearer SUPERSECRET" -d "ALL"`
|
||||
Reference in New Issue
Block a user