Endurance

Interfaces

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

Interfaces

GET /{applianceId}/interfaces

get details of all interface

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

POST /{applianceId}/interfaces

Add a Interface

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();
Response
{
  "status": "success",
  "message": "Interface created"
}

By ID

GET /{applianceId}/interfaces/{id}

get details of specified interface or 'all'

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

PUT /{applianceId}/interfaces/{id}

Update an interface

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
offload boolean

offload can only set on ethernet interface

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();
Response
{
  "status": "success",
  "message": "Interface updated"
}

DELETE /{applianceId}/interfaces/{id}

Delete a Interface

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();
Response
{
  "status": "success",
  "message": "Interface deleted"
}

Assign a floating IP group to an interface

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

Assign a FIP group to a Network interface

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();
Response
{
  "status": "success",
  "message": "Group assigned to interface {id}"
}

Remove a floating IP group from an interface

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

Remove a group from an Interface

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();
Response
{
  "status": "success",
  "message": "Group removed from interface {interface}"
}