Graph
curl --request GET \
--url https://api.honcho.dev/v3/workspaces/{workspace_id}/graph \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.honcho.dev/v3/workspaces/{workspace_id}/graph"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.honcho.dev/v3/workspaces/{workspace_id}/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.honcho.dev/v3/workspaces/{workspace_id}/graph",
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.honcho.dev/v3/workspaces/{workspace_id}/graph"
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.honcho.dev/v3/workspaces/{workspace_id}/graph")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honcho.dev/v3/workspaces/{workspace_id}/graph")
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_body"<string>"{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}graph
Graph
Structure-only conclusion graph as an Arrow IPC stream. Experimental.
GET
/
v3
/
workspaces
/
{workspace_id}
/
graph
Graph
curl --request GET \
--url https://api.honcho.dev/v3/workspaces/{workspace_id}/graph \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.honcho.dev/v3/workspaces/{workspace_id}/graph"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.honcho.dev/v3/workspaces/{workspace_id}/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.honcho.dev/v3/workspaces/{workspace_id}/graph",
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.honcho.dev/v3/workspaces/{workspace_id}/graph"
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.honcho.dev/v3/workspaces/{workspace_id}/graph")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honcho.dev/v3/workspaces/{workspace_id}/graph")
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_body"<string>"{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}The response is an Arrow IPC stream with one row per live conclusion, ordered by creation time and then ID. It carries no conclusion text. Fetch text for the conclusions you show with
The schema metadata key
In Python, pyarrow, polars and DuckDB read it directly:
POST /graph/text.
| Column | Type | Meaning |
|---|---|---|
id | string | The conclusion’s ID |
level | dictionary | explicit, deductive, inductive or contradiction |
observer, observed | dictionary | The peers whose perspective holds the conclusion |
observer_kind | dictionary | scope when the observer is a scope, otherwise peer |
session | dictionary, nullable | The session the conclusion came from |
created_at | timestamp (µs, UTC) | When the conclusion was created |
times_derived | uint32 | How many times the conclusion was derived. It starts at 1 and grows each time a duplicate reinforces it |
sources | list of uint32 | Row numbers of this conclusion’s sources in the response, in source order |
unresolved_outside | uint32 | Sources that are live but outside the requested observer and observed |
unresolved_deleted | uint32 | Sources that were deleted |
unresolved_unknown | uint32 | Other missing sources, such as an ID with no row in this workspace |
lineage | dictionary | not_applicable for an explicit conclusion, complete when every source is in the response, partial when any is missing, unknown for an inference with no recorded sources |
is_copy | bool | A scope backfill copied this conclusion from another perspective |
copied_from | uint32, nullable | Row number of the original, when it is in the response |
honcho.graph.version changes when a column changes meaning or type. New columns don’t change it.
A graph with more conclusions than the server’s GRAPH_MAX_CONCLUSIONS (150,000 by default, provisional) returns a 422. Filter by observer or observed, and use GET /graph/overview to see each pair’s count.
Each response carries an ETag. Send it back in If-None-Match to get a 304 when nothing changed. The server still runs the full query before it compares.
In TypeScript, flechette or apache-arrow read the stream:
import { tableFromIPC } from "@uwdata/flechette";
const response = await fetch(`${baseUrl}/v3/workspaces/${workspaceId}/graph`, {
headers: { Authorization: `Bearer ${apiKey}` },
});
const graph = tableFromIPC(new Uint8Array(await response.arrayBuffer()));
const ids = graph.getChild("id").toArray();
import httpx
import pyarrow as pa
response = httpx.get(
f"{base_url}/v3/workspaces/{workspace_id}/graph",
headers={"Authorization": f"Bearer {api_key}"},
)
graph = pa.ipc.open_stream(response.content).read_all()
Authorizations
Response
The graph as an Arrow IPC stream.
The response is of type file.
Was this page helpful?