Server Management
A Server may need several management operations, to solve these needs our systems expose different requirements regarding powering it on and off.
Turning on a Server
The following request is available to turn on a server:
HTTP request
POST /ecs/v2/servers/{servername}/actions
{
"type": "power_on"
}
HTTP Response
{
"id": 709,
"status": "in-progress",
"user": "foo",
"created_at": "2024-10-19T15:08:55.887799+00:00",
"started_at": "",
"completed_at": "",
"resource": "ec200001",
"resource_type": "ECS",
"type": "power_on",
"progress": 10
}
You may receive the following errors:
Status Code | Message | Explanation |
---|---|---|
400 | action type is required | the 'type' field is required |
Turning Off a Server
The following request is available to shut down a server:
HTTP Request
POST /ecs/v2/servers/{servername}/actions
{
"type": "power_off"
}
HTTP Response
{
"id": 709,
"status": "in-progress",
"user": "foo",
"created_at": "2024-10-19T15:08:55.887799+00:00",
"started_at": "",
"completed_at": "",
"resource": "ec200001",
"resource_type": "ECS",
"type": "power_off",
"progress": 10
}
You may receive the following errors:
Status Code | Message | Explanation |
---|---|---|
400 | action type is required | the 'type' field is required |