2023-10-14 20:19:26 +02:00
|
|
|
# FieldPOC controller
|
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
The FieldPOC controller is a HTTP REST API to help managing the current state of the FieldPOC system.
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
Connect to it via the IP address von port set in the [FieldPOC configuration](configuration.md).
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
## API Endpoints
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
### `/sync`
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
```bash
|
|
|
|
curl --json '{}' http://127.0.0.1:9437/sync
|
|
|
|
```
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
Notify all parts of FieldPOC to check configuration of connected components and update it.
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
### `/queues`
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
```bash
|
|
|
|
curl http://127.0.0.1:9437/queues
|
|
|
|
```
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
Show internal message queue stats.
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
### `/reload`
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
```bash
|
|
|
|
curl --json '{}' http://127.0.0.1:9437/reload
|
|
|
|
```
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
Read [FieldPOC extensions specification](extensions.md) file and apply it.
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
### `/claim`
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
```bash
|
|
|
|
curl --json '{"extension": "1111", "token": "1234"}' http://127.0.0.1:9437/claim
|
|
|
|
```
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
Bind extension to DECT device
|
2023-10-14 20:19:26 +02:00
|
|
|
|
2023-12-25 18:45:02 +01:00
|
|
|
- `extension` is the current extension number of the DECT device.
|
2023-10-14 20:19:26 +02:00
|
|
|
- `token` is the `dect_claim_token` of the extension that should get applied.
|
|
|
|
|
|
|
|
This works because newly connected DECT phones get a temporary number assigned.
|
|
|
|
This temporary number is usually the current number.
|
|
|
|
But it is possible to use any extension, so the extension for a device can be changed any time.
|