Get graph
curl --request GET \
--url https://api.example.com/api/graphimport requests
url = "https://api.example.com/api/graph"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph', 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/graph",
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/graph"
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/graph")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph")
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{
"nodes": [
{}
],
"edges": [
{}
]
}Graph & analytics
Get graph
Retrieve the graph structure — nodes and edges — for visualization and analysis.
GET
/
api
/
graph
Get graph
curl --request GET \
--url https://api.example.com/api/graphimport requests
url = "https://api.example.com/api/graph"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/graph', 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/graph",
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/graph"
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/graph")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/graph")
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{
"nodes": [
{}
],
"edges": [
{}
]
}Query parameters
integer
default:"10"
Maximum number of nodes/edges to return.
integer
Filter by session. Omit to return all sessions.
string
Filter by agent type. Omit to return all agent types.
Response
GraphNodeResponse[]
Array of graph nodes.
GraphEdgeResponse[]
Array of graph edges.
GraphNodeResponse
| Field | Type | Description |
|---|---|---|
id | u64 | Node identifier |
label | String | Node label |
node_type | String | Type: "Event", "Goal", "Action", "Context", etc. |
created_at | u64 | Creation timestamp |
properties | JSON | Node properties (any JSON object) |
GraphEdgeResponse
| Field | Type | Description |
|---|---|---|
id | u64 | Edge identifier |
from | u64 | Source node ID |
to | u64 | Target node ID |
edge_type | String | Type: "CausedBy", "PartOf", "LeadsTo", etc. |
weight | f32 | Edge weight (0.0–1.0) |
confidence | f32 | Confidence in the edge (0.0–1.0) |
{
"nodes": [
{
"id": 1,
"label": "user_message",
"node_type": "Event",
"created_at": 1738425600000000000,
"properties": { "message_type": "user_message" }
}
],
"edges": [
{
"id": 1,
"from": 1,
"to": 2,
"edge_type": "LeadsTo",
"weight": 0.95,
"confidence": 0.9
}
]
}
