Skip to content

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

RollBack a Server

To restore a Snapshot, simply execute the following request:

HTTP Request

{
    "type": "rollback",
    "snapshot": 105
}
HTTP Response
{
    "id": 2118,
    "status": "in-progress",
    "user": "admin",
    "created_at": "2025-02-07T13:46:27.864204+00:00",
    "started_at": "2025-02-07T13:46:27.863404+00:00",
    "completed_at": null,
    "resource": "ec200409",
    "resource_type": "ECS",
    "type": "rollback",
    "progress": 0
}

Warning

This operation will require a server reboot and might take several minutes.