Power controls
Power a single instance on or off, or run one action across many instances at once. Both calls return a workflow and run in the background.
Power one instance
POST /v1/instances/{id}/powercurl -X POST "https://api.galaxygate.net/v1/instances/$INSTANCE_ID/power" \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "action": "SHUTDOWN" }'action values
The action field takes one of four values:
POWER_ON: boot a stopped instance.SHUTDOWN: ask the OS to shut down cleanly. This is the graceful stop.POWER_OFF: cut power immediately. This is the hard stop.POWER_CYCLE: hard power off, then power on.
Prefer SHUTDOWN for routine stops so the OS flushes to disk. Use POWER_OFF and POWER_CYCLE when the machine is unresponsive and a clean shutdown is not possible.
No separate reboot action
There is no REBOOT action. A hard restart is POWER_CYCLE. For a graceful restart, send SHUTDOWN and then POWER_ON once the instance has stopped. The panel labels POWER_CYCLE as Reboot in its power menu, but the API name is POWER_CYCLE.
Power a batch of instances
To run one action over several instances in a single request:
POST /v1/commands/batch-instance-powercurl -X POST "https://api.galaxygate.net/v1/commands/batch-instance-power" \
-H "Authorization: Bearer $GALAXYGATE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "POWER_CYCLE",
"instances": [101, 102, 103]
}'The request has two fields:
action(string): one of the four power actions above.instances(array of integers): the instance IDs to act on.
This is asynchronous. It applies the action across the instances and returns a workflow. If you are driving a large fleet and start seeing 429 Too Many Requests, split the work into smaller batches and back off between them.
Next step
Run code with cloud-init to configure a server on boot, or head back to Create a server.