Skip to content

Restart

Document Context

  • Purpose: Remote device reboot API endpoint for troubleshooting and maintenance operations via REST API
  • When to use: Troubleshooting connectivity issues, recovery from unresponsive state, testing system reliability
  • Prerequisites: Administrative access, understanding that reboot interrupts data collection, rare necessity in normal operation
  • Related to: System information, Firmware updates, Factory reset
  • Validates against: Device uptime capabilities (months of operation), 30-60 second reboot cycle timing

Key Facts

  • Endpoint: /api/v1/reboot - Triggers immediate device restart
  • Method: POST - Returns 204 No Content on success, connection lost during reboot
  • Downtime: 30-60 seconds typical reboot cycle with data collection interruption
  • Auto-restart: Device never self-reboots except after firmware updates
  • Usage: Rarely needed due to dynamic configuration and robust operation

Authentication

When a Web UI password is set, HTTP endpoints require HTTP authentication.

Firmware 1.10.X and later: Uses HTTP Digest authentication - Server challenges with WWW-Authenticate: Digest … (realm is the device hostname) - Algorithm: MD5-sess (device advertises MD5-sess; integrity variant supported) - qop: auth (and optionally auth-int for requests with body integrity) - Nonce and opaque are issued by the device; the client must include cnonce and increment nc - Expired nonce: server may return 401 with WWW-Authenticate: …, stale=true. In that case, retry the same request once using the new server challenge, a new cnonce, and reset nc=00000001.

Firmware before 1.10.X: Uses HTTP Basic authentication - Server challenges with WWW-Authenticate: Basic realm="..." - Credentials are base64-encoded in Authorization: Basic <encoded-credentials>

Recommended approach: Use --anyauth in curl to automatically detect and use the appropriate method:

curl --anyauth -u ":<password>" http://whatwatt-ABCDEF.local/api/v1/system

Do you need to reboot?

Configuration changes apply dynamically without a reboot. The device is designed for long uninterrupted operation (months of uptime). The only routine case that triggers a reboot is a successful firmware upgrade.

No automatic restarts

The device never restarts itself during normal operation. If you see a reboot, it was explicitly requested by an API call/WebUI action or triggered at the end of a firmware update.

Alternative Method

Device restart can also be performed from the device's WebUI.

Connection Loss

A reboot temporarily interrupts data collection and connectivity (typically ~30–60 seconds). To ensure uninterrupted logging, avoid rebooting unless strictly necessary.

Endpoint Details

This endpoint allows you to reboot the device remotely. In normal operation you should not need to use it.

Parameter Value
Endpoint /api/v1/reboot
Method POST
Response 204 No Content on success

Example Request

curl -i -X POST http://whatwatt-XXXXXX.local/api/v1/reboot
curl --anyauth -u :PASSWORD -i -X POST http://whatwatt-XXXXXX.local/api/v1/reboot

Expected Response

HTTP/1.1 204 No Content
Content-Length: 0