Skip to content
Odinex Cloud
API reference

Elastic IPs

List Elastic IPs

GET
/elastic_ips

Authorization

headerAuthorizationBearer <token>

Query Parameters

label_selector?string

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

Response Body

Elastic IPs

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

Create Elastic IP

POST
/elastic_ips

Authorization

headerAuthorizationBearer <token>

Request Body

application/json
  1. body
name?string
Lengthlength <= 64
location?string

Required unless server is given

server?integer

Assign to this server (it must have no public IPs)

Formatint64
labels?

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

Response Body

Created

application/json
  1. response
elastic_ip*
action*
curl -X POST "https://example.com/elastic_ips" \  -H "Content-Type: application/json" \  -d '{}'
{  "elastic_ip": {    "id": 0,    "name": "string",    "ip": "string",    "location": "string",    "server": 0,    "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 Elastic IP

GET
/elastic_ips/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Elastic IP

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

Delete Elastic IP

DELETE
/elastic_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/elastic_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 Elastic IP

PUT
/elastic_ips/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

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

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

protection?

Response Body

Updated

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

The server must have no public IPs and its network a NAT gateway. Traffic to the address reaches the server's private address; nothing needs configuring inside the guest. Firewalls on the server apply.

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/elastic_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
/elastic_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/elastic_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"    }  }}