Add expanded GitHub wiki content and publish guide
This commit is contained in:
parent
c0ea660e48
commit
42f3baecb6
8 changed files with 302 additions and 0 deletions
40
docs/wiki/Admin-API.md
Normal file
40
docs/wiki/Admin-API.md
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Admin API
|
||||
|
||||
Alle Admin-Endpunkte benötigen einen Bearer Token, außer Bootstrap Status/Login.
|
||||
|
||||
Base URL:
|
||||
|
||||
`https://staysense.vanityontour.de/api`
|
||||
|
||||
## Token erhalten
|
||||
|
||||
```bash
|
||||
curl -s -X POST https://staysense.vanityontour.de/api/admin/login \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"username":"DEIN_USER","password":"DEIN_PASSWORT"}'
|
||||
```
|
||||
|
||||
Token steht in `session.token`.
|
||||
|
||||
## Header für Folgeanfragen
|
||||
|
||||
`Authorization: Bearer <TOKEN>`
|
||||
|
||||
## Endpunkte
|
||||
|
||||
- `GET /admin/bootstrap/status`
|
||||
- `POST /admin/bootstrap` (nur initial)
|
||||
- `POST /admin/login`
|
||||
- `POST /admin/logout`
|
||||
- `GET /admin/overview`
|
||||
- `GET /admin/events?limit=100`
|
||||
- `POST /admin/events`
|
||||
- `PUT /admin/events/{id}`
|
||||
- `DELETE /admin/events/{id}`
|
||||
|
||||
## Beispiel: Overview
|
||||
|
||||
```bash
|
||||
curl -s https://staysense.vanityontour.de/api/admin/overview \
|
||||
-H "Authorization: Bearer <TOKEN>"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue