Hanzo AI
OpenapiGraph

Create diff

Reports what came into force, was superseded and was retracted between two points.

POST /v1/graph/diff

Addresshttps://api.hanzo.ai/v1/graph/diff
MethodPOST
OperationgraphDiff
AuthAuthorization: Bearer $HANZO_API_KEY

Reports what came into force, was superseded and was retracted between two points.

Each point is resolved as resolve would, never read off the rows in between. A version that loses the order is invisible here as it is there, and one that repeats what held is agreement, not change.

Time: a point is an as_of and an as_known instant, from and from_known against to and to_known. Hold the known instants equal for what happened in the world; hold the valid instants equal for what the record learned. to and to_known default to now, from to to and from_known to to_known, and the two points must differ.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
entitybodystringEntity narrows the diff to what was asserted about one entity.
frombodystringFrom is the earlier instant of the world, RFC 3339. What held here is the baseline, so a statement beginning exactly at From is part of it and not a change.
from_knownbodystringFromKnown is how much this plane had heard at the baseline, RFC 3339.
limitbodyinteger (int64)Limit caps how many (entity, relation) pairs are examined, in key order.
tobodystringTo is the later instant of the world, RFC 3339, and may not precede From.
to_knownbodystringToKnown is how much it had heard at the later point, RFC 3339, and may not precede FromKnown.

Response

StatusBodyMeaning
200graph.graphDiffOutok
defaultproblem-detailsrefused

200 body — 78 fields.

FieldInTypeAlwaysDescription
assertedbodygraph.wireFact[]Asserted is each statement holding at To that did not at From.
asserted[].atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
asserted[].bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
asserted[].confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
asserted[].entitybodystringEntity is the thing described, in the organization's own namespace.
asserted[].evidencebodystringEvidence points at the record the claim came from.
asserted[].idbodystringID is the assertion's content address, minted by the server from what was asserted.
asserted[].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.
asserted[].namesbodybooleanNames true means the assertion is an edge and Value is an entity.
asserted[].relationbodystringRelation is what was asserted of it.
asserted[].seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
asserted[].sourcebodystringSource names who asserted, as the caller gave it.
asserted[].untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
asserted[].valuebodystringValue is what the relation points at: another entity's key when Names is true, otherwise a scalar.
boundbodyinteger (int64)Bound is how many pairs this diff examined at most.
frombodystringFrom is the earlier instant, RFC 3339, echoed.
from_knownbodystringFromKnown is the knowledge instant of the baseline, RFC 3339.
retractedbodygraph.graphChange[]Retracted is each statement that held at From and no longer does at To, with what ended it as Now: the retraction, the later value, or the statement itself…
retracted[].nowbodygraph.wireFact
retracted[].now.atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
retracted[].now.bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
retracted[].now.confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
retracted[].now.entitybodystringEntity is the thing described, in the organization's own namespace.
retracted[].now.evidencebodystringEvidence points at the record the claim came from.
retracted[].now.idbodystringID is the assertion's content address, minted by the server from what was asserted.
retracted[].now.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.
retracted[].now.namesbodybooleanNames true means the assertion is an edge and Value is an entity.
retracted[].now.relationbodystringRelation is what was asserted of it.
retracted[].now.seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
retracted[].now.sourcebodystringSource names who asserted, as the caller gave it.
retracted[].now.untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
retracted[].now.valuebodystringValue is what the relation points at: another entity's key when Names is true, otherwise a scalar.
retracted[].wasbodygraph.wireFact
retracted[].was.atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
retracted[].was.bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
retracted[].was.confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
retracted[].was.entitybodystringEntity is the thing described, in the organization's own namespace.
retracted[].was.evidencebodystringEvidence points at the record the claim came from.
retracted[].was.idbodystringID is the assertion's content address, minted by the server from what was asserted.
retracted[].was.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.
retracted[].was.namesbodybooleanNames true means the assertion is an edge and Value is an entity.
retracted[].was.relationbodystringRelation is what was asserted of it.
retracted[].was.seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
retracted[].was.sourcebodystringSource names who asserted, as the caller gave it.
retracted[].was.untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
retracted[].was.valuebodystringValue is what the relation points at: another entity's key when Names is true, otherwise a scalar.
supersededbodygraph.graphChange[]Superseded is each property whose value at From was replaced by a different one at To, once per pair however many came in between.
superseded[].nowbodygraph.wireFact
superseded[].now.atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
superseded[].now.bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
superseded[].now.confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
superseded[].now.entitybodystringEntity is the thing described, in the organization's own namespace.
superseded[].now.evidencebodystringEvidence points at the record the claim came from.
superseded[].now.idbodystringID is the assertion's content address, minted by the server from what was asserted.
superseded[].now.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.
superseded[].now.namesbodybooleanNames true means the assertion is an edge and Value is an entity.
superseded[].now.relationbodystringRelation is what was asserted of it.
superseded[].now.seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
superseded[].now.sourcebodystringSource names who asserted, as the caller gave it.
superseded[].now.untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
superseded[].now.valuebodystringValue is what the relation points at: another entity's key when Names is true, otherwise a scalar.
superseded[].wasbodygraph.wireFact
superseded[].was.atbodystringAt is when the thing was so, RFC 3339, as the asserter gave it.
superseded[].was.bybodystringBy is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
superseded[].was.confidencebodynumber (double)Confidence in [0,1] as the asserter gave it; absent is 0.
superseded[].was.entitybodystringEntity is the thing described, in the organization's own namespace.
superseded[].was.evidencebodystringEvidence points at the record the claim came from.
superseded[].was.idbodystringID is the assertion's content address, minted by the server from what was asserted.
superseded[].was.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.
superseded[].was.namesbodybooleanNames true means the assertion is an edge and Value is an entity.
superseded[].was.relationbodystringRelation is what was asserted of it.
superseded[].was.seenbodystringSeen is when the asserter says it became knowable, RFC 3339.
superseded[].was.sourcebodystringSource names who asserted, as the caller gave it.
superseded[].was.untilbodystringUntil is when the thing stopped being so, RFC 3339, as the asserter gave it.
superseded[].was.valuebodystringValue is what the relation points at: another entity's key when Names is true, otherwise a scalar.
tobodystringTo is the later instant, RFC 3339: the one asked for, or the server's clock when none was.
to_knownbodystringToKnown is the knowledge instant of the later point, RFC 3339.
truncatedbodybooleanTruncated says more pairs gathered assertions in the interval than Bound, or that one pair holds more than a single read returns.

Failure carries the platform error shape — see Errors.

Examples

hanzo graph diff

Graph API · All Hanzo APIs · Interactive reference

How is this guide?

On this page