Endurance

Console

Console

Deprecated: read consoleEnabled from GET /{applianceId}/system/userinterface instead. This route will be removed in a future release.

GET /{applianceId}/system/console

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

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

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

get {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/system/console
  body: none
  auth: bearer
}

auth:bearer {
  token: {{token}}
}
Response
{
  "status": "success",
  "message": "Console status",
  "data": {
    "active": false
  }
}

Deprecated: send consoleEnabled and consolePassword to PUT /{applianceId}/system/userinterface instead. This route will be removed in a future release. Switching Console Access on needs a password. While it is on, password is optional and changes the password when given. A password must be 8 to 128 characters long and contain an upper-case letter, a lower-case letter, a digit and a symbol. Refused while a transaction is open. Commit or roll back the transaction first.

PUT /{applianceId}/system/console

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

Path parameters
applianceId string Required

.Body parameters

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

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

$payload = [
    'active' => true,
    'password' => '<password>',
];

$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 = {
    "active": true,
    "password": "<password>"
}

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

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

put {
  url: https://{{node-0}}:{{port}}/api/v1/{applianceId}/system/console
  body: json
  auth: bearer
}

headers {
  Content-Type: application/json
}

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

body:json {
  {
    "active": true,
    "password": "<password>"
  }
}
Response
{
  "status": "success",
  "message": "Console updated",
  "data": {
    "active": false
  }
}