docs
This commit is contained in:
29
docs/pages/api/talas_v5_DB/device/getAllStationsNames.md
Normal file
29
docs/pages/api/talas_v5_DB/device/getAllStationsNames.md
Normal file
@@ -0,0 +1,29 @@
|
||||
<!-- /docs/pages/api/talas_v5_DB/device/getAllStationsNames.md -->
|
||||
|
||||
# 🧾 getAllStationsNames.js
|
||||
|
||||
Liefert eine Zuordnungstabelle aller Geräte-IDs (`idLD`) zu ihren Namen (`name`).
|
||||
|
||||
## Methode
|
||||
|
||||
- `GET`
|
||||
|
||||
## Antwortformat
|
||||
|
||||
```json
|
||||
{
|
||||
"123": "Kue 705",
|
||||
"124": "Basisstation 1"
|
||||
}
|
||||
```
|
||||
|
||||
## Verhalten
|
||||
|
||||
- Nutzt Tabelle `location_device`
|
||||
- Gibt Fehler bei leerem Ergebnis (404) oder Datenbankfehler (500)
|
||||
|
||||
## Pfad
|
||||
|
||||
```bash
|
||||
/pages/api/talas_v5_DB/device/getAllStationsNames.js
|
||||
```
|
||||
34
docs/pages/api/talas_v5_DB/device/getDevices.md
Normal file
34
docs/pages/api/talas_v5_DB/device/getDevices.md
Normal file
@@ -0,0 +1,34 @@
|
||||
<!-- /docs/pages/api/talas_v5_DB/device/getDevices.md -->
|
||||
|
||||
# 🔌 getDevices.js
|
||||
|
||||
API-Route zum Abrufen aller Geräteinformationen aus der `devices`-Tabelle.
|
||||
|
||||
## Methode
|
||||
|
||||
- `POST` (erwartet JSON-Body mit optionalem `activeSystems`-Array)
|
||||
|
||||
## Verhalten
|
||||
|
||||
- Führt ein einfaches `SELECT * FROM devices` aus
|
||||
- Nutzt Singleton-MySQL-Pool für Verbindung
|
||||
- Rückgabe: JSON-Array mit allen Geräteobjekten
|
||||
|
||||
## Beispielantwort
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Kue705",
|
||||
"idsystem_typ": 1,
|
||||
...
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## Pfad
|
||||
|
||||
```bash
|
||||
/pages/api/talas_v5_DB/device/getDevices.js
|
||||
```
|
||||
Reference in New Issue
Block a user