Read the assertions this organization has recorded
Read the assertions this organization has recorded
GET /v1/graph
| Address | https://api.hanzo.ai/v1/graph |
| Method | GET |
| Operation | graphRead |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Read the assertions this organization has recorded
Request
5 fields.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
entity | query | string | — | Entity narrows to what was asserted ABOUT one entity. |
relation | query | string | — | Relation narrows to one relation. |
value | query | string | — | Value narrows to assertions pointing AT one value, which is how the edges into an entity are read. |
as_of | query | string | — | AsOf bounds the read to what was knowable at an instant, RFC 3339. |
limit | query | integer | — | Limit caps how many assertions come back. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | graphReadOut | ok |
200 body — 13 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
assertions | body | wireFact[] | — | Assertions are the matching rows in the order they were written, oldest first. |
assertions[].at | body | string | — | At is when the thing was so, RFC 3339, as the asserter gave it. |
assertions[].by | body | string | — | By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body. |
assertions[].confidence | body | number | — | Confidence in [0,1] as the asserter gave it; absent is 0. |
assertions[].entity | body | string | — | Entity is the thing described, in the organization's own namespace. |
assertions[].evidence | body | string | — | Evidence points at the record the claim came from. |
assertions[].id | body | string | — | ID is the assertion's content address, minted by the server from what was asserted. |
assertions[].knowable | body | string | — | Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. |
assertions[].names | body | boolean | — | Names true means the assertion is an edge and Value is an entity. |
assertions[].relation | body | string | — | Relation is what was asserted of it. |
assertions[].seen | body | string | — | Seen is when the asserter says it became knowable, RFC 3339. |
assertions[].source | body | string | — | Source names who asserted, as the caller gave it. |
assertions[].value | body | string | — | Value is what the relation points at: another entity's key when Names is true, otherwise a scalar. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, GraphApi } from 'hanzoai';
const api = new GraphApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.graphRead();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import GraphApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = GraphApi(client).graph_read()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.GraphAPI.GraphRead(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, graph_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = graph_api::graph_read(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GraphApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new GraphApi(client).graphRead();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/graph \
-H "Authorization: Bearer $HANZO_API_KEY"The door declares no tool for graph — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?