Skip to content
Odinex Cloud
API reference

Floating IPs

List floating IPs

GET
/floating_ips

Authorization

headerAuthorizationBearer <token>

Query Parameters

label_selector?string

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

Response Body

Floating IPs

application/json
  1. response
floating_ips*array<>
curl -X GET "https://example.com/floating_ips"
{  "floating_ips": [    {      "id": 0,      "name": "string",      "description": "string",      "type": "ipv4",      "ip": "string",      "location": "string",      "server": 0,      "dns_ptr": "string",      "blocked": true,      "protection": {        "delete": true      },      "labels": {        "property1": "string",        "property2": "string"      },      "created": "2019-08-24T14:15:22Z"    }  ]}

Create floating IP

POST
/floating_ips

Authorization

headerAuthorizationBearer <token>

Request Body

application/json
  1. body
type*string
Value in"ipv4""ipv6"
name?string
Lengthlength <= 64
description?string
Lengthlength <= 255
location?string

Required unless server is given

server?integer

Assign to this server

Formatint64
labels?

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

Response Body

Created

application/json
  1. response
floating_ip*
action?|null
curl -X POST "https://example.com/floating_ips" \  -H "Content-Type: application/json" \  -d '{    "type": "ipv4"  }'
{  "floating_ip": {    "id": 0,    "name": "string",    "description": "string",    "type": "ipv4",    "ip": "string",    "location": "string",    "server": 0,    "dns_ptr": "string",    "blocked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  },  "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"    }  }}

Get floating IP

GET
/floating_ips/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

FloatingIp

application/json
  1. response
floating_ip*
curl -X GET "https://example.com/floating_ips/0"
{  "floating_ip": {    "id": 0,    "name": "string",    "description": "string",    "type": "ipv4",    "ip": "string",    "location": "string",    "server": 0,    "dns_ptr": "string",    "blocked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}

Delete floating IP

DELETE
/floating_ips/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Deletion started

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

Update floating IP

PUT
/floating_ips/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
name?string
Length1 <= length <= 64
description?string
Lengthlength <= 255
labels?

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

protection?

Response Body

Updated

application/json
  1. response
floating_ip*
curl -X PUT "https://example.com/floating_ips/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "floating_ip": {    "id": 0,    "name": "string",    "description": "string",    "type": "ipv4",    "ip": "string",    "location": "string",    "server": 0,    "dns_ptr": "string",    "blocked": true,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}
POST
/floating_ips/{id}/actions/assign

The address is routed to the server's public interface. Add it inside the guest (e.g. ip addr add 203.0.113.7/32 dev eth0, persisted in netplan) and announce it once with a gratuitous ARP (arping -U -c 3 -I eth0 203.0.113.7; Ubuntu: apt install iputils-arping) or reboot. Until the server announces it, traffic may still reach the previous holder.

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
server*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/floating_ips/0/actions/assign" \  -H "Content-Type: application/json" \  -d '{    "server": 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"    }  }}
POST
/floating_ips/{id}/actions/unassign

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Action started

application/json
  1. response
action*
curl -X POST "https://example.com/floating_ips/0/actions/unassign"
{  "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
/floating_ips/{id}/actions/change_dns_ptr

The hostname must already resolve to the IP (forward-confirmed reverse DNS).

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
dns_ptr?|

null resets the entry

Response Body

Changed

application/json
  1. response
action*
curl -X POST "https://example.com/floating_ips/0/actions/change_dns_ptr" \  -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"    }  }}