Analytics
curl --request GET \
--url https://api.example.com/api/analyticsimport requests
url = "https://api.example.com/api/analytics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/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.example.com/api/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/analytics"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/analytics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"node_count": 123,
"edge_count": 123,
"connected_components": 123,
"largest_component_size": 123,
"average_path_length": 123,
"diameter": 123,
"clustering_coefficient": 123,
"average_clustering": 123,
"modularity": 123,
"community_count": 123,
"learning_metrics": {}
}Graph & analytics
Analytics
Advanced graph analytics — connected components, clustering, modularity, and learning metrics.
GET
/
api
/
analytics
Analytics
curl --request GET \
--url https://api.example.com/api/analyticsimport requests
url = "https://api.example.com/api/analytics"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/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.example.com/api/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/analytics"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/analytics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"node_count": 123,
"edge_count": 123,
"connected_components": 123,
"largest_component_size": 123,
"average_path_length": 123,
"diameter": 123,
"clustering_coefficient": 123,
"average_clustering": 123,
"modularity": 123,
"community_count": 123,
"learning_metrics": {}
}Response
integer
Total nodes in graph.
integer
Total edges in graph.
integer
Number of connected components.
integer
Size of the largest component.
number
Average shortest path length.
integer
Graph diameter.
number
Global clustering coefficient.
number
Average local clustering.
number
Modularity score.
integer
Number of communities detected.
LearningMetricsResponse
Learning-specific metrics.
LearningMetricsResponse
| Field | Type | Description |
|---|---|---|
total_events | usize | Total events processed |
unique_contexts | usize | Number of unique contexts |
learned_patterns | usize | Number of learned patterns |
strong_memories | usize | Number of strong memories |
overall_success_rate | f32 | Overall success rate (0.0–1.0) |
average_edge_weight | f32 | Average edge weight |
{
"node_count": 15420,
"edge_count": 32801,
"connected_components": 5,
"largest_component_size": 14200,
"average_path_length": 3.2,
"diameter": 8,
"clustering_coefficient": 0.45,
"average_clustering": 0.52,
"modularity": 0.68,
"community_count": 12,
"learning_metrics": {
"total_events": 15420,
"unique_contexts": 320,
"learned_patterns": 45,
"strong_memories": 120,
"overall_success_rate": 0.82,
"average_edge_weight": 0.65
}
}
