Zum Inhalt springen
Odinex Cloud
API-Referenz

Netzwerke

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

List networks

GET
/networks

Autorisierung

headerAutorisierungBearer <token>

Query-Parameter

label_selector?string

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

Response-Body

Networks

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

Create network

POST
/networks

Autorisierung

headerAutorisierungBearer <token>

Request-Body

application/json
  1. body
name*string
Länge1 <= length <= 64
ip_range*string

Private IPv4 range, /16 to /28

location*string
labels?

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

Response-Body

Created

application/json
  1. response
network*
action?|null
curl -X POST "https://example.com/networks" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "ip_range": "10.0.0.0/16",    "location": "string"  }'
{  "network": {    "id": 0,    "name": "string",    "ip_range": "string",    "location": "string",    "status": "creating",    "servers": [      {        "server": 0,        "ip": "string"      }    ],    "gateway": "string",    "nat_gateway": 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 network

GET
/networks/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Response-Body

Network

application/json
  1. response
network*
curl -X GET "https://example.com/networks/0"
{  "network": {    "id": 0,    "name": "string",    "ip_range": "string",    "location": "string",    "status": "creating",    "servers": [      {        "server": 0,        "ip": "string"      }    ],    "gateway": "string",    "nat_gateway": 0,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}

Delete network

DELETE
/networks/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Response-Body

Deletion started

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

PUT
/networks/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Request-Body

application/json
  1. body
name?string
Länge1 <= length <= 64
labels?

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

protection?

Response-Body

Updated

application/json
  1. response
network*
curl -X PUT "https://example.com/networks/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "network": {    "id": 0,    "name": "string",    "ip_range": "string",    "location": "string",    "status": "creating",    "servers": [      {        "server": 0,        "ip": "string"      }    ],    "gateway": "string",    "nat_gateway": 0,    "protection": {      "delete": true    },    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}