Skip to content
Odinex Cloud
API reference

Primary IPs

Get primary IP

GET
/primary_ips/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Primary IP

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

List primary IPs

GET
/primary_ips

Authorization

headerAuthorizationBearer <token>

Query Parameters

label_selector?string

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

Response Body

Primary IPs

application/json
  1. response
primary_ips*array<>
curl -X GET "https://example.com/primary_ips"
{  "primary_ips": [    {      "id": 0,      "name": "string",      "type": "ipv4",      "ip": "string",      "assignee_id": 0,      "auto_delete": true,      "blocked": true,      "dns_ptr": "string",      "location": "string",      "labels": {        "property1": "string",        "property2": "string"      },      "created": "2019-08-24T14:15:22Z"    }  ]}
POST
/primary_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/primary_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"    }  }}