Endurance

Conntrack

Global settings

Get Conntrack Global Settings

GET /conntrack/global

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

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

const data = await response.json();
Bruno
meta {
  name: Get the global connection tracking settings
  type: http
  seq: 1
}

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

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Conntrack Global Settings",
  "data": {
    "replicationServiceIP": "111-111-111-111",
    "replicationPort": 7778
  }
}

Update Conntrack Global Settings

PUT /conntrack/global

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

Body parameters
replicationServiceIP string Required

The Service IP ID used for replication or the empty string if no replication is desired

replicationPort integer Required

The port used for replication

curl
curl -X PUT "https://appliance.example.com/api/v1/conntrack/global" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "replicationServiceIP": "<replicationServiceIP>",
  "replicationPort": 0
}'
PHP
<?php

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

$payload = [
    'replicationServiceIP' => '<replicationServiceIP>',
    'replicationPort' => 0,
];

$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 = {
    "replicationServiceIP": "<replicationServiceIP>",
    "replicationPort": 0
}

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

const data = await response.json();
Bruno
meta {
  name: Update the global connection tracking settings
  type: http
  seq: 1
}

put {
  url: https://{{node-0}}:{{port}}/api/v1/conntrack/global
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "replicationServiceIP": "<replicationServiceIP>",
    "replicationPort": 0
  }
}
Response
{
  "status": "success",
  "message": "Conntrack Global Settings updated",
  "data": {
    "replicationServiceIP": "111-111-111-111",
    "replicationPort": 7778
  }
}