Endurance

Interfaces

Updated

The appliance network interfaces, their addresses, and the bonds and VLANs built on them.

Interfaces

get details of all interface

GET /{applianceId}/interfaces

Path parameters
applianceId string Required
curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/interfaces" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/interfaces", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: List the interfaces
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Interface data for all",
  "data": [
    {
      "id": "4c2-b40-cf0-552",
      "name": "Management",
      "type": "ethernet",
      "uuid": "28542aba-4d6e-4cf5-b045-a9eb854808f2",
      "settings": {
        "interfaceName": "ens192",
        "mtu": 0,
        "onBoot": true,
        "vlanId": 0,
        "status": "up",
        "offload": false,
        "speed": "10 Gb/s",
        "link": true,
        "minMtu": 1280,
        "maxMtu": 9000
      },
      "routing": {
        "dns": [
          "192.168.64.1"
        ],
        "dnsSearch": []
      },
      "speed": "10 Gb/s",
      "link": true,
      "groups": [
        "b09-359-089-3e3"
      ]
    },
    {
      "id": "3c0-f53-531-d6c",
      "name": "Network-1",
      "type": "ethernet",
      "uuid": "71b39697-a5bc-4555-90d3-a03a4dbcf265",
      "settings": {
        "interfaceName": "ens224",
        "mtu": 0,
        "onBoot": true,
        "vlanId": 0,
        "status": "up",
        "offload": false,
        "speed": "10 Gb/s",
        "link": true,
        "minMtu": 1280,
        "maxMtu": 9000
      },
      "routing": {
        "dns": [],
        "dnsSearch": []
      },
      "speed": "10 Gb/s",
      "link": true,
      "groups": [
        "0df-78b-956-f04"
      ]
    },
    {
      "id": "ea6-2eb-2d4-cd0",
      "name": "Network-2",
      "type": "ethernet",
      "uuid": "71b39697-a5bc-4555-90d3-a03a4dbcf265",
      "settings": {
        "interfaceName": "ens193",
        "mtu": 0,
        "onBoot": true,
        "vlanId": 0,
        "status": "up",
        "offload": false,
        "speed": "10 Gb/s",
        "link": true,
        "minMtu": 1280,
        "maxMtu": 9000
      },
      "routing": {
        "dns": [],
        "dnsSearch": []
      },
      "speed": "10 Gb/s",
      "link": true,
      "groups": [
        "0df-78b-956-f04"
      ]
    }
  ]
}

Add a Interface

POST /{applianceId}/interfaces

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required

.Body parameters

name string Required
vlanId string

VLAN tag (VLAN only)

parentId string

The interface a VLAN is built on (VLAN only)

type string Required

The kind of interface to add: vlan or bond

mtu integer default: 1500

Bond only, default 1500. 0 for automatic, or from 1280 to 9216 until the bond has members; each member is then checked against it as it joins.

mode balance-rr | active-backup | balance-xor | 802.3ad

Bonding mode (bond only)

xmitHashPolicy layer2 | layer2+3 | layer3+4

Transmit hash policy of a balance-xor or 802.3ad bond. Refused for any other mode. Empty or omitted on a new bond means layer2+3; omitted on an edit keeps the current policy, and a change to a mode that does not hash clears it.

offload boolean default: false

Bond only, default false. True turns on GRO, GSO and TSO on the bond and its members; false leaves them at the driver default.

curl
curl -X POST "https://appliance.example.com/api/v1/{applianceId}/interfaces" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "vlanId": "<vlanId>",
  "parentId": "<parentId>",
  "type": "<type>",
  "mtu": 1500,
  "mode": "balance-rr",
  "xmitHashPolicy": "layer2",
  "offload": false
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'name' => '<name>',
    'vlanId' => '<vlanId>',
    'parentId' => '<parentId>',
    'type' => '<type>',
    'mtu' => 1500,
    'mode' => 'balance-rr',
    'xmitHashPolicy' => 'layer2',
    'offload' => false,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "name": "<name>",
    "vlanId": "<vlanId>",
    "parentId": "<parentId>",
    "type": "<type>",
    "mtu": 1500,
    "mode": "balance-rr",
    "xmitHashPolicy": "layer2",
    "offload": false
}

response = requests.post("https://appliance.example.com/api/v1/{applianceId}/interfaces", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "vlanId": "<vlanId>",
  "parentId": "<parentId>",
  "type": "<type>",
  "mtu": 1500,
  "mode": "balance-rr",
  "xmitHashPolicy": "layer2",
  "offload": false
}),
});

const data = await response.json();
Bruno
meta {
  name: Create an interface
  type: http
  seq: 1
}

post {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "name": "<name>",
    "vlanId": "<vlanId>",
    "parentId": "<parentId>",
    "type": "<type>",
    "mtu": 1500,
    "mode": "balance-rr",
    "xmitHashPolicy": "layer2",
    "offload": false
  }
}
Response
{
  "status": "success",
  "message": "Interface created"
}

By ID

get details of specified interface or 'all'

GET /{applianceId}/interfaces/{id}

Path parameters
applianceId string Required
id string Required
curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Get an interface
  type: http
  seq: 1
}

get {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Interface data for {id}",
  "data": {
    "id": "4c2-b40-cf0-552",
    "name": "Management",
    "type": "ethernet",
    "uuid": "28542aba-4d6e-4cf5-b045-a9eb854808f2",
    "settings": {
      "interfaceName": "ens192",
      "mtu": 0,
      "onBoot": true,
      "vlanId": 0,
      "status": "up",
      "offload": false,
      "speed": "10 Gb/s",
      "link": true,
      "minMtu": 1280,
      "maxMtu": 9000
    },
    "routing": {
      "dns": [
        "192.168.64.1"
      ],
      "dnsSearch": []
    },
    "speed": "10 Gb/s",
    "link": true,
    "groups": [
      "b09-359-089-3e3"
    ]
  }
}

Update an interface

PUT /{applianceId}/interfaces/{id}

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required
id string Required

.Body parameters

name string
type string

set to bondChild to join an ethernet interface to a bond

mtu integer

0 for automatic, or from 1280 to the most the interface takes, given as maxMtu when it is read: its NIC’s maximum, the lowest of its members' for a bond, or its parent’s MTU for a VLAN. Only checked when it changes.

onBoot boolean

Whether the interface is brought up at boot. Refused as false on the interface the request arrives on, and on any interface it runs over, since the appliance would be unreachable on that address after a reboot.

offload boolean

Ethernet and bond interfaces only. True turns on GRO, GSO and TSO; false leaves them at the driver default rather than turning them off. A bond’s members follow the bond.

bondingMode balance-rr | active-backup | balance-xor | 802.3ad
xmitHashPolicy layer2 | layer2+3 | layer3+4

Transmit hash policy of a balance-xor or 802.3ad bond. Refused for any other mode. Empty or omitted on a new bond means layer2+3; omitted on an edit keeps the current policy, and a change to a mode that does not hash clears it.

curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "<name>",
  "type": "<type>",
  "mtu": 0,
  "onBoot": true,
  "offload": true,
  "bondingMode": "balance-rr",
  "xmitHashPolicy": "layer2"
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'name' => '<name>',
    'type' => '<type>',
    'mtu' => 0,
    'onBoot' => true,
    'offload' => true,
    'bondingMode' => 'balance-rr',
    'xmitHashPolicy' => 'layer2',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "name": "<name>",
    "type": "<type>",
    "mtu": 0,
    "onBoot": true,
    "offload": true,
    "bondingMode": "balance-rr",
    "xmitHashPolicy": "layer2"
}

response = requests.put("https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "<name>",
  "type": "<type>",
  "mtu": 0,
  "onBoot": true,
  "offload": true,
  "bondingMode": "balance-rr",
  "xmitHashPolicy": "layer2"
}),
});

const data = await response.json();
Bruno
meta {
  name: Update an interface
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces/{id}
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "name": "<name>",
    "type": "<type>",
    "mtu": 0,
    "onBoot": true,
    "offload": true,
    "bondingMode": "balance-rr",
    "xmitHashPolicy": "layer2"
  }
}
Response
{
  "status": "success",
  "message": "Interface updated"
}

Delete a Interface

DELETE /{applianceId}/interfaces/{id}

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required
id string Required
curl
curl -X DELETE "https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.delete("https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Delete an interface
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces/{id}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Interface deleted"
}

Assign a floating IP group to an interface

Assign a FIP group to a Network interface

PUT /{applianceId}/interfaces/{id}/group

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required
id string Required

.Body parameters

groupId string Required

Id of group to add.

curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "<groupId>"
}'
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group';
$headers = [
    'Authorization: Bearer ' . $token,
    'Content-Type: application/json',
];

$payload = [
    'groupId' => '<groupId>',
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}
payload = {
    "groupId": "<groupId>"
}

response = requests.put("https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "groupId": "<groupId>"
}),
});

const data = await response.json();
Bruno
meta {
  name: Assign a floating IP group to an interface
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces/{id}/group
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

auth:bearer {
  token: {{token}}
}

body:json {
  {
    "groupId": "<groupId>"
  }
}
Response
{
  "status": "success",
  "message": "Group assigned to interface {name}"
}

Remove a floating IP group from an interface

Remove a group from an Interface

DELETE /{applianceId}/interfaces/{id}/group/{groupId}

This change is staged. Send PUT /services/apply to apply it.

Path parameters
applianceId string Required
id string Required
groupId string Required

Id of group to add.

curl
curl -X DELETE "https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group/{groupId}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group/{groupId}';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.delete("https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group/{groupId}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/interfaces/{id}/group/{groupId}', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Bruno
meta {
  name: Remove a floating IP group from an interface
  type: http
  seq: 1
}

delete {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/interfaces/{id}/group/{groupId}
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Group removed from interface {name}"
}