Floating IP

FIPs

GET /fips

Get all Floating IPs

curl
curl -X GET "https://appliance.example.com/api/v1/fips" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/fips';
$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/fips", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/fips', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IPs",
  "data": [
    {
      "id": "189-1e2-8b1-85e",
      "groupId": "189-1e2-8b1-85e",
      "ip": "10.10.11.101",
      "enabled": true
    }
  ]
}

POST /fips

Add a floating IP

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

Body parameters
groupId string Required
ip string Required
enabled boolean default: "true"

Boolean to make the IP enabled

curl
curl -X POST "https://appliance.example.com/api/v1/fips" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "<groupId>",
  "ip": "<ip>",
  "enabled": "true"
}'
PHP
<?php

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

$payload = [
    'groupId' => '<groupId>',
    'ip' => '<ip>',
    'enabled' => 'true',
];

$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 = {
    "groupId": "<groupId>",
    "ip": "<ip>",
    "enabled": "true"
}

response = requests.post("https://appliance.example.com/api/v1/fips", headers=headers, json=payload)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/fips', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${token}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "groupId": "<groupId>",
  "ip": "<ip>",
  "enabled": "true"
}),
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IP: {ip} added to group successfully",
  "data": {
    "id": "189-1e2-8b1-85e"
  }
}

Disable the floating IPs

PUT /fips/disable

Set All Floating IPs Down

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

Body parameters
ids string Required

Supply an array of ids to disable if empty all will be disabled

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

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

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

$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 = {
    "ids": "<ids>"
}

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IPs now disabled"
}

Enable the floating IPs

PUT /fips/enable

Set All Floating IPs Up

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

Body parameters
ids string Required

Supply an array of ids to enable if empty all will be enabled

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

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

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

$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 = {
    "ids": "<ids>"
}

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IPs now enabled"
}

FIPs by ID

GET /fips/{id}

Add a floating ip to a group

Path parameters
id string Required

The id of the fip.

curl
curl -X GET "https://appliance.example.com/api/v1/fips/{id}" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/fips/{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/fips/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/fips/{id}', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IP",
  "data": {
    "id": "189-1e2-8b1-85e",
    "groupId": "189-1e2-8b1-85e",
    "ip": "10.10.11.101",
    "enabled": true
  }
}

PUT /fips/{id}

Edit a floating IP

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

Path parameters
id string Required

.Body parameters

groupId string Required
ip string Required
enabled boolean default: "true"

Boolean to make the IP enabled

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

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

$payload = [
    'groupId' => '<groupId>',
    'ip' => '<ip>',
    'enabled' => 'true',
];

$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>",
    "ip": "<ip>",
    "enabled": "true"
}

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IP: {ip} edited in group successfully"
}

DELETE /fips/{id}

Delete a floating IP

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

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

$url = 'https://appliance.example.com/api/v1/fips/{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/fips/{id}", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/fips/{id}', {
  method: 'DELETE',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Floating IP: {ip} deleted successfully"
}