Skip to content
Odinex Cloud
API reference

NAT Gateways

List NAT gateways

GET
/nat_gateways

Authorization

headerAuthorizationBearer <token>

Query Parameters

label_selector?string

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

Response Body

NAT gateways

application/json
  1. response
nat_gateways*array<>
curl -X GET "https://example.com/nat_gateways"
{  "nat_gateways": [    {      "id": 0,      "name": "string",      "network": 0,      "location": "string",      "status": "creating",      "public_ip": "string",      "private_ip": "string",      "labels": {        "property1": "string",        "property2": "string"      },      "created": "2019-08-24T14:15:22Z"    }  ]}

Create NAT gateway

POST
/nat_gateways

Authorization

headerAuthorizationBearer <token>

Request Body

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

Network name or ID. Its first address becomes the gateway: servers without public IPs in it reach the internet from the NAT gateway's public IPv4.

labels?

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

Response Body

Created

application/json
  1. response
nat_gateway*
action*
curl -X POST "https://example.com/nat_gateways" \  -H "Content-Type: application/json" \  -d '{    "network": "string"  }'
{  "nat_gateway": {    "id": 0,    "name": "string",    "network": 0,    "location": "string",    "status": "creating",    "public_ip": "string",    "private_ip": "string",    "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 NAT gateway

GET
/nat_gateways/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

NAT gateway

application/json
  1. response
nat_gateway*
curl -X GET "https://example.com/nat_gateways/0"
{  "nat_gateway": {    "id": 0,    "name": "string",    "network": 0,    "location": "string",    "status": "creating",    "public_ip": "string",    "private_ip": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}

Delete NAT gateway

DELETE
/nat_gateways/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Deletion started

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

PUT
/nat_gateways/{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

Response Body

Updated

application/json
  1. response
nat_gateway*
curl -X PUT "https://example.com/nat_gateways/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "nat_gateway": {    "id": 0,    "name": "string",    "network": 0,    "location": "string",    "status": "creating",    "public_ip": "string",    "private_ip": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}