Resolve graph

Answers what holds for one entity and relation at a point, winner first, with every weaker account that disagreed.

POST /v1/graph/resolve

Addresshttps://api.hanzo.ai/v1/graph/resolve
MethodPOST
OperationgraphResolve
AuthAuthorization: Bearer $HANZO_API_KEY

Answers what holds for one entity and relation at a point, winner first, with every weaker account that disagreed.

The winner is the holding statement begun most recently, then the strongest under the rule vocabulary names. A relation that holds many values answers each; a disagreement is reported as contested, never resolved into silence.

Time: as_of is the instant of the world asked about and as_known how much this plane had heard; either absent is now.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
as_knownbodystring—AsKnown is how much this plane had heard, RFC 3339: the answer as it would have been given then, which is what makes a past answer reproducible.
as_ofbodystring—AsOf is the instant of the world to answer about, RFC 3339: what held then.
entitybodystringyesEntity is the thing to answer about.
relationbodystringyesRelation is the one relation to settle.

Response

StatusBodyMeaning
200graph.graphResolveOutok
defaultproblem-detailsrefused

200 body — 49 fields.

FieldInTypeAlwaysDescription
as_knownbodystring—AsKnown is the knowledge instant it was taken at, RFC 3339, the same way.
as_ofbodystring—AsOf is the valid instant this answer was taken at, RFC 3339: the one asked for, or the server's clock when none was.
conflictsbodygraph.wireFact[]—Conflicts is, for a relation holding one value, every weaker account of the winner's moment that names a different value, strongest first.
conflicts[].atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
conflicts[].bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
conflicts[].confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
conflicts[].entitybodystring—Entity is the thing described, in the organization's own namespace.
conflicts[].evidencebodystring—Evidence points at the record the claim came from.
conflicts[].idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
conflicts[].knowablebodystring—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.
conflicts[].namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
conflicts[].relationbodystring—Relation is what was asserted of it.
conflicts[].seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
conflicts[].sourcebodystring—Source names who asserted, as the caller gave it.
conflicts[].untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
conflicts[].valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
contestedbodyboolean—Contested is true exactly when Conflicts is not empty.
entitybodystring—Entity is the entity the question named, echoed so a stored answer still says what it is about.
heldbodygraph.wireFact[]—Held is every statement holding at the point, Winner first, one per value: one for a relation that holds one value at a time, and every one the pair holds for a relation that holds many — the five holders of a position over five terms are five.
held[].atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
held[].bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
held[].confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
held[].entitybodystring—Entity is the thing described, in the organization's own namespace.
held[].evidencebodystring—Evidence points at the record the claim came from.
held[].idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
held[].knowablebodystring—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.
held[].namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
held[].relationbodystring—Relation is what was asserted of it.
held[].seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
held[].sourcebodystring—Source names who asserted, as the caller gave it.
held[].untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
held[].valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
knownbodyboolean—Known is false when nothing held at the point.
relationbodystring—Relation is the relation the question named, echoed for the same reason.
truncatedbodyboolean—Truncated says this pair holds more statements than one read returns, so the answer was decided from the ceiling-full begun most recently.
winnerbodygraph.wireFact—
winner.atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
winner.bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
winner.confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
winner.entitybodystring—Entity is the thing described, in the organization's own namespace.
winner.evidencebodystring—Evidence points at the record the claim came from.
winner.idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
winner.knowablebodystring—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.
winner.namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
winner.relationbodystring—Relation is what was asserted of it.
winner.seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
winner.sourcebodystring—Source names who asserted, as the caller gave it.
winner.untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
winner.valuebodystring—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 graph resolve
import { Configuration, GraphApi } from 'hanzoai';

const api = new GraphApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.graphResolve({ entity: "<entity>", relation: "<relation>" });
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_resolve(entity="<entity>", relation="<relation>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.GraphAPI.GraphResolve(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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_resolve(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.GraphApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new GraphApi(client).graphResolve();
curl -X POST https://api.hanzo.ai/v1/graph/resolve \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "entity": "<entity>",
       "relation": "<relation>"
     }'

Tool graph, op graphResolve — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "graph",
         "arguments": {
           "op": "graphResolve",
           "input": {
             "entity": "<entity>",
             "relation": "<relation>"
           }
         }
       }
     }'

Graph API · All Hanzo APIs · Interactive reference

Was this page useful?