Endpoints
Power Control
Control system power state remotely.
The power endpoints allow you to remotely control your computer's power state, including shutdown, restart, sleep, and hibernate.
Endpoints
System Controls
All power endpoints accept a POST request and return the same success response.
POST /api/pw/shutdown
POST /api/pw/restart
POST /api/pw/sleep
POST /api/pw/hibernateResponse:
{
"status": "success"
}Configuration
Power commands can be enabled or disabled in your config.json:
{
"features": {
"enable_sleep": true,
"enable_restart": true,
"enable_shutdown": true,
"enable_hibernate": true
}
}By default, shutdown and restart are disabled for safety. Sleep and hibernate are enabled. You can toggle them individually in the configuration file or through the Deskctl Bridge dashboard settings.
Security
These endpoints perform system-level actions. Ensure your Deskctl server is only accessible on your trusted local network.
Example Usage Scenarios
1. Bedtime Routine
Turn off your PC from your phone (on the same Wi-Fi) when you go to bed.
- Tap the "Shutdown PC" button on your mobile dashboard.
- App sends
POST /api/pw/shutdown. - PC gracefully shuts down.
2. Remote Wake & Unlock
(Combined with WoL)
- Send WoL packet to wake PC.
- Wait for
GET /api/statusto return 200 OK. - You are now ready to control it.