Zum Inhalt springen
Odinex Cloud
API-Referenz

Primäre IPs

Diese Referenz wird aus der OpenAPI-Spezifikation erzeugt; die Beschreibungen der Endpunkte und Felder sind auf Englisch.

Get primary IP

GET
/primary_ips/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

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

Autorisierung

headerAutorisierungBearer <token>

Query-Parameter

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"    }  ]}

Set or reset the reverse DNS (PTR) entry

POST
/primary_ips/{id}/actions/change_dns_ptr

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

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

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