Skip to main content
POST
/
api
/
client
/
servers
/
:server
/
power
Server Power Actions
curl --request POST \
  --url https://api.example.com/api/client/servers/:server/power \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "<string>"
}
'
{
  "400": {},
  "403": {},
  "404": {},
  "500": {},
  "503": {},
  "data": {
    "success": true,
    "message": "<string>"
  }
}
Sends a power action command to the server. This endpoint communicates with the Wings daemon to control the server’s running state.

Authentication

Requires a valid session token and the server.power permission on the specified server.

Path Parameters

server
string
required
Server identifier (short identifier or UUID)

Request Body

action
string
required
The power action to perform. Must be one of:
  • start - Start the server if it’s stopped
  • stop - Gracefully stop the server
  • restart - Restart the server (graceful stop followed by start)
  • kill - Forcefully terminate the server process

Response

data
object
Power action result

Example Requests

curl -X POST "https://panel.example.com/api/client/servers/my-server/power" \
  -H "Cookie: session=your-session-token" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "start"
  }'

Example Response

{
  "data": {
    "success": true,
    "message": "Power action start sent successfully"
  }
}

Power Action Behavior

Start

Attempts to start the server if it’s currently stopped. If the server is already running, this may result in an error from the Wings daemon.

Stop

Sends a graceful shutdown signal to the server process. The server application will receive a termination signal and have time to save data and shut down cleanly.

Restart

Performs a graceful stop followed by a start. This is equivalent to running stop and then start sequentially.

Kill

Forcefully terminates the server process without allowing it to shut down gracefully. Use this only when the server is unresponsive or when a normal stop fails.
The kill action terminates the server process immediately without giving it time to save data. This may result in data loss or corruption. Use with caution.

Error Responses

400
Bad Request
Invalid action value or missing server identifier
{
  "status": 400,
  "message": "Invalid power action. Must be one of: start, stop, restart, kill"
}
403
Forbidden
User lacks server.power permission or Wings authentication failed
{
  "status": 403,
  "message": "Wings authentication failed: Invalid token"
}
404
Not Found
Server not found or user does not have access
503
Service Unavailable
Wings daemon is unavailable or unreachable
{
  "status": 503,
  "message": "Wings daemon unavailable: Connection timeout"
}
500
Internal Server Error
Unknown error occurred while sending power action
{
  "status": 500,
  "message": "Failed to send power action to Wings: Unknown error"
}

Activity Logging

All power actions are logged to the server activity log. The activity entry includes:
  • Actor (user who performed the action)
  • Action type (e.g., server.power.start)
  • Timestamp
  • Metadata containing the specific power action
You can view these logs via the server activity endpoint or the panel UI.

Build docs developers (and LLMs) love