Hanzo AI
OpenapiGraph

Create path

Finds the shortest chain of in-force edges from one entity to another.

POST /v1/graph/path

Addresshttps://api.hanzo.ai/v1/graph/path
MethodPOST
OperationgraphPath
AuthAuthorization: Bearer $HANZO_API_KEY

Finds the shortest chain of in-force edges from one entity to another.

It is the walk behind neighbors stopped at a goal: the same bound and the same rule for which edge is in force. A causal chain is this op with relations naming the relations that mean cause, such as caused_by and influenced.

Time: as_of and as_known place the graph the path is found in; either absent is now.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
as_knownbodystringAsKnown 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_ofbodystringAsOf finds the path through the graph as it stood at an instant of the world, RFC 3339: an edge that did not hold then is not crossed.
directionbodystringDirection is out, in or both.
frombodystringyesFrom is the entity the path starts at.
relationsbodystring[]Relations is the edge relations a path may cross. Absent crosses every relation.
tobodystringyesTo is the entity the path ends at.

Response

StatusBodyMeaning
200graph.graphPathOutok
defaultproblem-detailsrefused

200 body — 35 fields.

FieldInTypeAlwaysDescription
as_knownbodystringAsKnown is the knowledge instant it was taken at, RFC 3339, the same way.
as_ofbodystringAsOf is the instant the path was taken at, RFC 3339: the one asked for, or the server's clock when none was.
boundbodyinteger (int64)Bound is the ceiling the search was held to, the same one a walk is.
decaybodynumber (double)Decay is the product of the edges' confidences: how much certainty survives the whole chain.
edgesbodygraph.wireFact[]Edges is the path from From to To, one assertion per hop, each with its source, evidence and filer.
edges[].atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
edges[].bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
edges[].confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
edges[].entitybodystringEntity is the thing described, in the organization's own namespace.
edges[].evidencebodystringEvidence points at the record the claim came from.
edges[].idbodystringID is the assertion's content address, minted by the server from what was asserted.
edges[].knowablebodystringKnowable 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.
edges[].namesbodybooleanNames true means the assertion is an edge and Value is an entity.
edges[].relationbodystringRelation is what was asserted of it.
edges[].seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
edges[].sourcebodystringSource names who asserted, as the caller gave it.
edges[].untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
edges[].valuebodystringValue is what the relation points at: another entity's key when Names is true, otherwise a scalar.
foundbodybooleanFound is false when no path of in-force edges joins the two within the bound.
hopsbodyinteger (int64)Hops is how many edges the path crosses: zero when From is To, and zero when nothing was found.
truncatedbodybooleanTruncated says the bound stopped the search before a path was found, so Found false means none within the bound rather than none at all.
weakestbodygraph.wireFact
weakest.atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
weakest.bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
weakest.confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
weakest.entitybodystringEntity is the thing described, in the organization's own namespace.
weakest.evidencebodystringEvidence points at the record the claim came from.
weakest.idbodystringID is the assertion's content address, minted by the server from what was asserted.
weakest.knowablebodystringKnowable 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.
weakest.namesbodybooleanNames true means the assertion is an edge and Value is an entity.
weakest.relationbodystringRelation is what was asserted of it.
weakest.seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
weakest.sourcebodystringSource names who asserted, as the caller gave it.
weakest.untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
weakest.valuebodystringValue 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 path

Graph API · All Hanzo APIs · Interactive reference

How is this guide?

On this page