Skip to content
Odinex Cloud
API reference

Server Actions

Start a server

POST
/servers/{id}/actions/poweron

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/poweron"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}

Cut power (hard stop)

POST
/servers/{id}/actions/poweroff

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/poweroff"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/shutdown

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/shutdown"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}

Graceful reboot

POST
/servers/{id}/actions/reboot

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/reboot"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}

Hard reset

POST
/servers/{id}/actions/reset

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/reset"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/rebuild

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
image*string

Image name or ID

Response Body

Action started

application/json
  1. response
action*
root_password?string|null
curl -X POST "https://example.com/servers/0/actions/rebuild" \  -H "Content-Type: application/json" \  -d '{    "image": "string"  }'
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  },  "root_password": "string"}

Change the server type

POST
/servers/{id}/actions/change_type

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
server_type*string
upgrade_disk*boolean

If false the disk keeps its size, so you can downgrade later

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/change_type" \  -H "Content-Type: application/json" \  -d '{    "server_type": "string",    "upgrade_disk": true  }'
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/enable_rescue

Restarts the server into a rescue Linux system right away. The server's disk is attached unmounted as /dev/sda; rescue-mount mounts it on /mnt and rescue-chroot enters it. Log in as root with the returned root_password (shown once) or with the SSH keys the server was created with. While rescue is enabled only disable_rescue and deleting the server are possible. Not available for MikroTik RouterOS.

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
ssh_keys?array<string>

Accepted for compatibility and ignored; the server's own keys work in the rescue system.

Response Body

Action started

application/json
  1. response
action*
root_password?string
curl -X POST "https://example.com/servers/0/actions/enable_rescue" \  -H "Content-Type: application/json" \  -d '{}'
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  },  "root_password": "string"}
POST
/servers/{id}/actions/disable_rescue

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/disable_rescue"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/reset_password

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
root_password?string
curl -X POST "https://example.com/servers/0/actions/reset_password"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  },  "root_password": "string"}
POST
/servers/{id}/actions/request_console

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
wss_url?string

Valid for one connection within 60 seconds

curl -X POST "https://example.com/servers/0/actions/request_console"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  },  "wss_url": "string"}
POST
/servers/{id}/actions/attach_to_network

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
network*string

Network name or ID

ip?string

Optional fixed IP inside the network

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/attach_to_network" \  -H "Content-Type: application/json" \  -d '{    "network": "string"  }'
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/detach_from_network

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
network*string

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/detach_from_network" \  -H "Content-Type: application/json" \  -d '{    "network": "string"  }'
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/create_image

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
description?string
Lengthlength <= 255
labels?

Up to 64 key/value pairs; keys and values up to 63 characters

Response Body

Action started

application/json
  1. response
action*
image?
curl -X POST "https://example.com/servers/0/actions/create_image" \  -H "Content-Type: application/json" \  -d '{}'
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  },  "image": {    "id": 0,    "type": "system",    "name": "string",    "description": "string",    "os_flavor": "ubuntu",    "os_version": "string",    "architecture": "x86",    "disk_size": 0,    "image_size": 0,    "status": "creating",    "deprecated": "2019-08-24T14:15:22Z",    "created_from": 0,    "protection": {      "delete": true    },    "locations": [      "string"    ],    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}
POST
/servers/{id}/actions/enable_backup

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Done

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/enable_backup"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}
POST
/servers/{id}/actions/disable_backup

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Done

application/json
  1. response
action*
curl -X POST "https://example.com/servers/0/actions/disable_backup"
{  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}