Endurance

Interfaces

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
      },
      "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
      },
      "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
      },
      "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 Required
parentId string Required
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>"
}'
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>',
];

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

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>"
}),
});

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>"
  }
}
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
    },
    "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 0 | 68-65535
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 interfaces only. True turns on GRO, GSO and TSO; false leaves them at the driver default rather than turning them off.

bondingMode balance-rr | active-backup | 802.3ad
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"
}'
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',
];

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

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"
}),
});

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