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"        },        "elastic_ip": {          "id": 0,          "ip": "string"        }      },      "primary_network": 0,      "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,      "network_blocked": 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, including your snapshots and image backups. Required unless backup is set.

backup?

Create the server from a backup of another server instead of an image: its disk is restored into the new server's disk, which must be at least as large. The source server keeps running unchanged. Takes the place of image; the backup must be in the same location.

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
backups?boolean

Enable daily backups (+20 % of the server price), billed from when the server exists

Defaultfalse
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?

Set both to false for a server without public IPs (VPC): it must list at least one network, and the first one becomes its primary network. It reaches the internet through that network's NAT gateway and can be reached from outside through an Elastic IP or a load balancer.

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",    "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"      },      "elastic_ip": {        "id": 0,        "ip": "string"      }    },    "primary_network": 0,    "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,    "network_blocked": 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"      },      "elastic_ip": {        "id": 0,        "ip": "string"      }    },    "primary_network": 0,    "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,    "network_blocked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    }  }}
DELETE
/servers/{id}

Backups are deleted with the server unless keep_backups is set; kept backups become snapshots, billed per GB. Snapshots of the server are kept unless delete_snapshots is set.

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Query Parameters

keep_backups?boolean
Defaultfalse
delete_snapshots?boolean
Defaultfalse

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"      },      "elastic_ip": {        "id": 0,        "ip": "string"      }    },    "primary_network": 0,    "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,    "network_blocked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    }  }}
GET
/servers/{id}/costs

Usage of the current month (live) for the server, its backups and its primary IPs.

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Costs

application/json
  1. response
costs*
curl -X GET "https://example.com/servers/0/costs"
{  "costs": {    "month": "2026-10",    "total": "string",    "lines": [      {        "description": "string",        "resource_type": "string",        "resource_id": 0,        "project_id": 0,        "sku": "string",        "hours": 0,        "hourly": "string",        "monthly_cap": "string",        "capped": true,        "amount": "string",        "from": "2019-08-24T14:15:22Z",        "to": "2019-08-24T14:15:22Z"      }    ]  }}
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          ]        ]      }    }  }}