Endurance

System

Shut the appliance down

PUT /{applianceId}/system/halt

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

Path parameters
applianceId string Required

The id of the cluster node the request is for.

curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/system/halt" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    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.put("https://appliance.example.com/api/v1/{applianceId}/system/halt", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/system/halt', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Server shutting down",
  "data": []
}

Reboot the appliance

PUT /{applianceId}/system/reboot

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

Path parameters
applianceId string Required

The id of the cluster node the request is for.

curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/system/reboot" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    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.put("https://appliance.example.com/api/v1/{applianceId}/system/reboot", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/system/reboot', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "Server restarting",
  "data": []
}

Update

POST /{applianceId}/system/update

Post System Update

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

Path parameters
applianceId string Required

The id of the cluster node the request is for.

Body parameters
packages string Required
curl
curl -X POST "https://appliance.example.com/api/v1/{applianceId}/system/update" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "packages": "<packages>"
}'
PHP
<?php

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

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

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "System updated",
  "data": {
    "packages": {
      "name": "lb_api",
      "version": "9.0.0",
      "arch": "noarch"
    }
  }
}

PUT /{applianceId}/system/update

Apply System Update

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

Path parameters
applianceId string Required

The id of the cluster node the request is for.

curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/system/update" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PUT',
    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.put("https://appliance.example.com/api/v1/{applianceId}/system/update", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/system/update', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "System updating",
  "data": []
}

Update to a new major version

PUT /{applianceId}/system/update/majorversion

Set system to update to next major version

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

Path parameters
applianceId string Required

The id of the cluster node the request is for.

Body parameters
versionNumber string Required
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/system/update/majorversion" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "versionNumber": "<versionNumber>"
}'
PHP
<?php

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

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

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "System has been set to major version {versionNumber}"
}

Get the software update status

GET /{applianceId}/system/update/status

System Get update status

Path parameters
applianceId string Required

The id of the cluster node the request is for.

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "System update status",
  "data": {
    "restartRequired": false,
    "majorVersion": [
      {
        "versionNumber": "5.0",
        "rockyRelease": "r9.2",
        "changelogURL": "www.loadbalancer.org",
        "osUpdate": true
      }
    ],
    "details": [
      {
        "name": "lb_api",
        "summary": "Loadbalancer.org API Files",
        "description": "Package containing our API for the loadbalancer",
        "url": "http://www.loadbalancer.org",
        "license": "GPLv2",
        "architecture": "noarch",
        "repository": "lbBase",
        "release": "12",
        "currentVersion": "4.0.1"
      }
    ]
  }
}

Force a check for software updates

GET /{applianceId}/system/update/status/force

Get System Update status (force update)

Path parameters
applianceId string Required

The id of the cluster node the request is for.

curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/system/update/status/force" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "System update status",
  "data": {
    "restartRequired": false,
    "majorVersion": [
      "4.0",
      "4.1"
    ],
    "details": [
      {
        "name": "lb_api",
        "summary": "Loadbalancer.org API Files",
        "description": "Package containing our API for the loadbalancer",
        "url": "http://www.loadbalancer.org",
        "license": "GPLv2",
        "architecture": "noarch",
        "repository": "lbBase",
        "release": "12",
        "currentVersion": "4.0.1",
        "pendingVersion": "4.0.2"
      }
    ]
  }
}