Gets analytics for a node
curl --request GET \
--url https://api.vexelia.com/nodes/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vexelia.com/nodes/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vexelia.com/nodes/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vexelia.com/nodes/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vexelia.com/nodes/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vexelia.com/nodes/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vexelia.com/nodes/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyNodes
Get analytics
GET
/
nodes
/
analytics
Gets analytics for a node
curl --request GET \
--url https://api.vexelia.com/nodes/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vexelia.com/nodes/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vexelia.com/nodes/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vexelia.com/nodes/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vexelia.com/nodes/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vexelia.com/nodes/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vexelia.com/nodes/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyYou must provide a security nonce to use this endpoint, you can obtain one
using the Get analytics
nonce endpoint.
WebSockets ahead!
This endpoint is a WebSocket endpoint, you must use a WebSocket client to
receive data from this endpoint.
Usage
This endpoint initiates a message upon successful connection, followed by updates every 5 seconds containing the requested analytical data. Below is an example of the analytical data transmitted over this connection.[
{
"timestamp": "2024-10-28T14:30:00Z",
"memory": 8192.0,
"memoryUsage": 4096.0,
"disk": 500000.0,
"diskWriteUsage": 120.5,
"diskReadUsage": 95.3,
"cpu": 4,
"cpuUsage": 1.75,
"networkInbound": 102400.0,
"networkOutbound": 76800.0
}
]
Response
datetime
required
Timestamp of the received analytical data.
decimal
required
The total memory of the node in megabytes.
decimal
required
The used memory of the node in megabytes.
decimal
required
The total disk size of the node in megabytes.
decimal
required
The current disk write usage in megabytes.
decimal
required
The current disk read usage in megabytes.
int64
required
The amount of CPU cores the node has.
decimal
required
The current overall CPU usage across all cores on the node, expressed as a
percentage.
decimal
required
The amount of inbound network usage in bytes
decimal
required
The amount of outbound network usage in bytes.

