Skip to main content
POST
/
servers
/
{server}
/
action
Power action (start/stop/reboot/rebuild)
curl --request POST \
  --url https://console.wenium.com/api/servers/{server}/action \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "start",
  "os_id": "ubuntu-22.04",
  "hostname": "rebuilt-server",
  "password": "SuperSecretPass123",
  "ssh_keys": [
    1,
    2
  ],
  "firewall_group_id": 5
}
'
{
  "status": true,
  "message": "Power action start completed successfully."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

server
integer
required

Body

application/json
action
enum<string>
required
Available options:
start,
stop,
reboot,
rebuild
Example:

"start"

os_id
string

Required if action is rebuild. The OS template ID.

Example:

"ubuntu-22.04"

hostname
string

Optional hostname for the rebuild.

Example:

"rebuilt-server"

password
string

Optional root password for the rebuild.

Example:

"SuperSecretPass123"

ssh_keys
integer[]

Optional array of SSH key IDs.

Example:
[1, 2]
firewall_group_id
integer

Optional firewall group ID to assign.

Example:

5

Response

200 - application/json

Action results

status
boolean
Example:

true

message
string
Example:

"Power action start completed successfully."