← Back to API Reference

API: Device Configuration & Control

Configure WiFi, update user settings, check firmware version, and send control commands to your Annaboto.

PUT /config/wifi

Sets the WiFi network credentials. Used during initial setup or when changing networks.

Endpoint: PUT http://<device-ip>:8080/annaboto/api/config/wifi
Content-Type: application/json
Returns: 200 on success

Request Body

{
  "ssid": "YourNetworkName",
  "pwd": "YourPassword"
}

Important Details

Example

curl -X PUT \
  http://10.42.0.1:8080/annaboto/api/config/wifi \
  -H "Content-Type: application/json" \
  -d '{"ssid": "MyHomeWiFi", "pwd": "secret123"}'
Note: During initial setup, the device runs in Access Point mode at IP 10.42.0.1. After WiFi is configured, it will be reachable at whatever IP your router assigns.

PUT /config/user

Updates user-facing settings like the plant name.

Endpoint: PUT http://<device-ip>:8080/annaboto/api/config/user
Content-Type: application/json
Returns: 200 on success

Request Body

{
  "plant": "My Basil Plant"
}

Notes

Example

curl -X PUT \
  http://192.168.0.103:8080/annaboto/api/config/user \
  -H "Content-Type: application/json" \
  -d '{"plant": "Kitchen Basil"}'

GET /version

Returns the device's firmware version. This is a lightweight endpoint — ideal as a connectivity/health check before making other API calls.

Endpoint: GET http://<device-ip>:8080/annaboto/api/version

Example

curl http://192.168.0.103:8080/annaboto/api/version

Usage

Use this as a quick "is the device reachable?" check before issuing heavier requests like /status or /sensor_history.

POST /control/reload

Triggers a configuration reload on the device. The device re-reads its settings files and applies changes without a full reboot.

Endpoint: POST http://<device-ip>:8080/annaboto/api/control/reload
Returns: 202 Accepted (async operation)

Behavior

Example

curl -X POST http://192.168.0.103:8080/annaboto/api/control/reload