Skip to content
Odinex Cloud
API reference

Servers

List servers

GET
/servers

Authorization

headerAuthorizationBearer <token>

Query Parameters

page?integer
Range1 <= value
Default1
per_page?integer
Range1 <= value <= 50
Default25
label_selector?string

Filter by labels: env=prod, env!=prod, env (has key), !env; comma = AND

name?string
status?string
Value in"initializing""starting""running""stopping""off""deleting""rebuilding""migrating""unknown"

Response Body

Servers

application/json
  1. response
servers*array<>
meta*
curl -X GET "https://example.com/servers"
{  "servers": [    {      "id": 0,      "name": "string",      "status": "initializing",      "created": "2019-08-24T14:15:22Z",      "public_net": {        "ipv4": {          "id": 0,          "ip": "string",          "blocked": true,          "dns_ptr": "string"        },        "ipv6": {          "id": 0,          "ip": "string",          "blocked": true,          "dns_ptr": "string"        }      },      "server_type": {        "id": 0,        "name": "t1",        "description": "Test 1",        "cpu_type": "shared",        "cores": 1,        "memory": 2,        "disk": 40,        "included_traffic": 0,        "deprecated": true,        "prices": [          {            "location": "fra1",            "price_hourly": {              "net": "0.0064000000",              "gross": "0.0064000000",              "currency": "EUR"            },            "price_monthly": {              "net": "0.0064000000",              "gross": "0.0064000000",              "currency": "EUR"            }          }        ]      },      "location": {        "id": 1,        "name": "fra1",        "description": "Frankfurt 1",        "country": "DE",        "city": "Frankfurt",        "network_zone": "eu-central",        "status": "active"      },      "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"      },      "primary_disk_size": 0,      "private_net": [        {          "network": 0,          "ip": "string"        }      ],      "volumes": [        0      ],      "floating_ips": [        0      ],      "placement_group": 0,      "backup_window": "22-02",      "rescue_enabled": true,      "locked": true,      "protection": {        "delete": true      },      "labels": {        "property1": "string",        "property2": "string"      }    }  ],  "meta": {    "pagination": {      "page": 0,      "per_page": 0,      "previous_page": 0,      "next_page": 0,      "last_page": 0,      "total_entries": 0    }  }}

Create server

POST
/servers

Authorization

headerAuthorizationBearer <token>

Request Body

application/json
  1. body
name*string

Hostname-safe: letters, digits, dots and dashes

Length1 <= length <= 63
server_type*string

Server type name (e.g. t1) or ID

image*string

Image name (e.g. ubuntu-24.04) or ID

location*string

Region name, e.g. fra1

ssh_keys?array<string>

SSH key names or IDs

user_data?string

cloud-init user data

Lengthlength <= 32768
labels?

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

start_after_create?boolean
Defaulttrue
placement_group?string

Placement group name or ID

networks?array<string>

Private networks (names or IDs) to attach

firewalls?array<string>

Firewalls (names or IDs) applied to the server from the start

Itemsitems <= 5
public_net?

Response Body

Server is being created

application/json
  1. response
server*
action*
root_password?|

Set only when no SSH key was given. Shown once.

curl -X POST "https://example.com/servers" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "server_type": "string",    "image": "string",    "location": "string"  }'
{  "server": {    "id": 0,    "name": "string",    "status": "initializing",    "created": "2019-08-24T14:15:22Z",    "public_net": {      "ipv4": {        "id": 0,        "ip": "string",        "blocked": true,        "dns_ptr": "string"      },      "ipv6": {        "id": 0,        "ip": "string",        "blocked": true,        "dns_ptr": "string"      }    },    "server_type": {      "id": 0,      "name": "t1",      "description": "Test 1",      "cpu_type": "shared",      "cores": 1,      "memory": 2,      "disk": 40,      "included_traffic": 0,      "deprecated": true,      "prices": [        {          "location": "fra1",          "price_hourly": {            "net": "0.0064000000",            "gross": "0.0064000000",            "currency": "EUR"          },          "price_monthly": {            "net": "0.0064000000",            "gross": "0.0064000000",            "currency": "EUR"          }        }      ]    },    "location": {      "id": 1,      "name": "fra1",      "description": "Frankfurt 1",      "country": "DE",      "city": "Frankfurt",      "network_zone": "eu-central",      "status": "active"    },    "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"    },    "primary_disk_size": 0,    "private_net": [      {        "network": 0,        "ip": "string"      }    ],    "volumes": [      0    ],    "floating_ips": [      0    ],    "placement_group": 0,    "backup_window": "22-02",    "rescue_enabled": true,    "locked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "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"}

Get server

GET
/servers/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Server

application/json
  1. response
server*
curl -X GET "https://example.com/servers/0"
{  "server": {    "id": 0,    "name": "string",    "status": "initializing",    "created": "2019-08-24T14:15:22Z",    "public_net": {      "ipv4": {        "id": 0,        "ip": "string",        "blocked": true,        "dns_ptr": "string"      },      "ipv6": {        "id": 0,        "ip": "string",        "blocked": true,        "dns_ptr": "string"      }    },    "server_type": {      "id": 0,      "name": "t1",      "description": "Test 1",      "cpu_type": "shared",      "cores": 1,      "memory": 2,      "disk": 40,      "included_traffic": 0,      "deprecated": true,      "prices": [        {          "location": "fra1",          "price_hourly": {            "net": "0.0064000000",            "gross": "0.0064000000",            "currency": "EUR"          },          "price_monthly": {            "net": "0.0064000000",            "gross": "0.0064000000",            "currency": "EUR"          }        }      ]    },    "location": {      "id": 1,      "name": "fra1",      "description": "Frankfurt 1",      "country": "DE",      "city": "Frankfurt",      "network_zone": "eu-central",      "status": "active"    },    "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"    },    "primary_disk_size": 0,    "private_net": [      {        "network": 0,        "ip": "string"      }    ],    "volumes": [      0    ],    "floating_ips": [      0    ],    "placement_group": 0,    "backup_window": "22-02",    "rescue_enabled": true,    "locked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    }  }}
DELETE
/servers/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Deletion started

application/json
  1. response
action*
curl -X DELETE "https://example.com/servers/0"
{  "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"    }  }}
PUT
/servers/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
name?string
Length1 <= length <= 63
labels?

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

protection?

Response Body

Updated

application/json
  1. response
server*
curl -X PUT "https://example.com/servers/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "server": {    "id": 0,    "name": "string",    "status": "initializing",    "created": "2019-08-24T14:15:22Z",    "public_net": {      "ipv4": {        "id": 0,        "ip": "string",        "blocked": true,        "dns_ptr": "string"      },      "ipv6": {        "id": 0,        "ip": "string",        "blocked": true,        "dns_ptr": "string"      }    },    "server_type": {      "id": 0,      "name": "t1",      "description": "Test 1",      "cpu_type": "shared",      "cores": 1,      "memory": 2,      "disk": 40,      "included_traffic": 0,      "deprecated": true,      "prices": [        {          "location": "fra1",          "price_hourly": {            "net": "0.0064000000",            "gross": "0.0064000000",            "currency": "EUR"          },          "price_monthly": {            "net": "0.0064000000",            "gross": "0.0064000000",            "currency": "EUR"          }        }      ]    },    "location": {      "id": 1,      "name": "fra1",      "description": "Frankfurt 1",      "country": "DE",      "city": "Frankfurt",      "network_zone": "eu-central",      "status": "active"    },    "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"    },    "primary_disk_size": 0,    "private_net": [      {        "network": 0,        "ip": "string"      }    ],    "volumes": [      0    ],    "floating_ips": [      0    ],    "placement_group": 0,    "backup_window": "22-02",    "rescue_enabled": true,    "locked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    }  }}
GET
/servers/{id}/metrics

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Query Parameters

type*string
Value in"cpu""disk""network"
start*string
Formatdate-time
end*string
Formatdate-time
step?integer

Seconds between points

Range10 <= value

Response Body

Metrics

application/json
  1. response
metrics*
curl -X GET "https://example.com/servers/0/metrics?type=cpu&start=2019-08-24T14%3A15%3A22Z&end=2019-08-24T14%3A15%3A22Z"
{  "metrics": {    "start": "2019-08-24T14:15:22Z",    "end": "2019-08-24T14:15:22Z",    "step": 0,    "time_series": {      "property1": {        "values": [          [            null          ]        ]      },      "property2": {        "values": [          [            null          ]        ]      }    }  }}