Endurance

Date & time

List the time zones

GET /system/datetime/timezones

Get TimeZones

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Time zones",
  "data": {
    "Africa": {
      "Abidjan": [],
      "Accra": [],
      "Addis Ababa": [],
      "Algiers": [],
      "Asmara": [],
      "Bamako": [],
      "Bangui": [],
      "Banjul": [],
      "Bissau": []
    }
  }
}

Date & time

GET /{applianceId}/system/datetime

Get Date and Time details

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Date and Time Details",
  "data": {
    "dateTime": "2023-09-22T11:37:34+01:00",
    "timezone": "Europe/London",
    "ntpEnabled": false,
    "ntp": [
      "0.uk.pool.ntp.org"
    ]
  }
}

PUT /{applianceId}/system/datetime

Set Date and Time

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

Path parameters
applianceId string Required

.Body parameters

dateTime string Required

ISO 8601 format (the timezone is ignored set using /system/datetime/timezone)

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

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

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

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully set date and time"
}

Set the NTP servers

PUT /{applianceId}/system/datetime/ntp

Set NTP servers

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

Path parameters
applianceId string Required

.Body parameters

ntpEnabled boolean Required
ntp array
curl
curl -X PUT "https://appliance.example.com/api/v1/{applianceId}/system/datetime/ntp" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "ntpEnabled": true,
  "ntp": [
    "<ntp>"
  ]
}'
PHP
<?php

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

$payload = [
    'ntpEnabled' => true,
    'ntp' => [
        '<ntp>',
    ],
];

$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 = {
    "ntpEnabled": true,
    "ntp": [
        "<ntp>"
    ]
}

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully configured NTP"
}

Set the time zone

PUT /{applianceId}/system/datetime/timezone

Set the Timezone

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

Path parameters
applianceId string Required

.Body parameters

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

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

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

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

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

const data = await response.json();
Response
{
  "status": "success",
  "message": "Successfully configured Time zone"
}