Create entity

Resolves the complete state of one entity at a point: its type, its holding properties and edges in both directions, its kinship scorecard and the expired statements it no longer holds.

POST /v1/graph/entity

Addresshttps://api.hanzo.ai/v1/graph/entity
MethodPOST
OperationgraphEntity
AuthAuthorization: Bearer $HANZO_API_KEY

Resolves the complete state of one entity at a point: its type, its holding properties and edges in both directions, its kinship scorecard and the expired statements it no longer holds.

Each (entity, relation) pair is settled by the same Resolve rule as graphResolve. Statements begun by the point that lost to a retraction, an until or a newer value are returned in expired rather than discarded.

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

Request

3 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.
as_ofbodystring—AsOf is the instant of the world to answer about, RFC 3339: what held then.
entitybodystringyesEntity is the entity key to resolve.

Response

StatusBodyMeaning
200graph.graphEntityOutok
defaultproblem-detailsrefused

200 body — 97 fields.

FieldInTypeAlwaysDescription
as_knownbodystring—AsKnown is the knowledge instant this state was resolved at, RFC 3339.
as_ofbodystring—AsOf is the valid instant this state was resolved at, RFC 3339.
entitybodystring—Entity is the folded entity key the question named.
expiredbodygraph.wireFact[]—Expired is every statement about the entity that was known by AsKnown and begun by AsOf but no longer holds at AsOf because its until passed, a retraction ended it, or a later statement superseded it.
expired[].atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
expired[].bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
expired[].confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
expired[].entitybodystring—Entity is the thing described, in the organization's own namespace.
expired[].evidencebodystring—Evidence points at the record the claim came from.
expired[].idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
expired[].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.
expired[].namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
expired[].relationbodystring—Relation is what was asserted of it.
expired[].seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
expired[].sourcebodystring—Source names who asserted, as the caller gave it.
expired[].untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
expired[].valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
incomingbodygraph.wireFact[]—Incoming is every in-force edge pointing at the entity at the point, ordered by source entity and relation key.
incoming[].atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
incoming[].bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
incoming[].confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
incoming[].entitybodystring—Entity is the thing described, in the organization's own namespace.
incoming[].evidencebodystring—Evidence points at the record the claim came from.
incoming[].idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
incoming[].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.
incoming[].namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
incoming[].relationbodystring—Relation is what was asserted of it.
incoming[].seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
incoming[].sourcebodystring—Source names who asserted, as the caller gave it.
incoming[].untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
incoming[].valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
knownbodyboolean—Known is true when at least one property, outgoing edge, incoming edge or expired statement was found for the entity.
outgoingbodygraph.wireFact[]—Outgoing is every in-force edge asserted about the entity at the point, ordered by relation key and then winner order.
outgoing[].atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
outgoing[].bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
outgoing[].confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
outgoing[].entitybodystring—Entity is the thing described, in the organization's own namespace.
outgoing[].evidencebodystring—Evidence points at the record the claim came from.
outgoing[].idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
outgoing[].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.
outgoing[].namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
outgoing[].relationbodystring—Relation is what was asserted of it.
outgoing[].seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
outgoing[].sourcebodystring—Source names who asserted, as the caller gave it.
outgoing[].untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
outgoing[].valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
propertiesbodygraph.graphEntityProperty[]—Properties is every in-force scalar property of the entity at the point, ordered by relation key.
properties[].conflictsbodygraph.wireFact[]—Conflicts is every weaker account of the winner's moment that names a different value, strongest first.
properties[].conflicts[].atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
properties[].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.
properties[].conflicts[].confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
properties[].conflicts[].entitybodystring—Entity is the thing described, in the organization's own namespace.
properties[].conflicts[].evidencebodystring—Evidence points at the record the claim came from.
properties[].conflicts[].idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
properties[].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.
properties[].conflicts[].namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
properties[].conflicts[].relationbodystring—Relation is what was asserted of it.
properties[].conflicts[].seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
properties[].conflicts[].sourcebodystring—Source names who asserted, as the caller gave it.
properties[].conflicts[].untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
properties[].conflicts[].valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
properties[].contestedbodyboolean—Contested is true exactly when Conflicts is not empty.
properties[].relationbodystring—Relation is the scalar relation's key.
properties[].valuebodystring—Value is the winning scalar value holding at the point.
properties[].winnerbodygraph.wireFact—
properties[].winner.atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
properties[].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.
properties[].winner.confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
properties[].winner.entitybodystring—Entity is the thing described, in the organization's own namespace.
properties[].winner.evidencebodystring—Evidence points at the record the claim came from.
properties[].winner.idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
properties[].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.
properties[].winner.namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
properties[].winner.relationbodystring—Relation is what was asserted of it.
properties[].winner.seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
properties[].winner.sourcebodystring—Source names who asserted, as the caller gave it.
properties[].winner.untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
properties[].winner.valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
scorecardbodygraph.graphKinshipScore[]—Scorecard is the kinship and closeness scores holding on the entity, highest score first.
scorecard[].assertionbodygraph.wireFact—
scorecard[].assertion.atbodystring—At is when the thing was so, RFC 3339, as the asserter gave it.
scorecard[].assertion.bybodystring—By is the identity that filed it — owner or owner/user — stamped from the validated principal at the write, never from the body.
scorecard[].assertion.confidencebodynumber (double)—Confidence in [0,1] as the asserter gave it; absent is 0.
scorecard[].assertion.entitybodystring—Entity is the thing described, in the organization's own namespace.
scorecard[].assertion.evidencebodystring—Evidence points at the record the claim came from.
scorecard[].assertion.idbodystring—ID is the assertion's content address, minted by the server from what was asserted.
scorecard[].assertion.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.
scorecard[].assertion.namesbodyboolean—Names true means the assertion is an edge and Value is an entity.
scorecard[].assertion.relationbodystring—Relation is what was asserted of it.
scorecard[].assertion.seenbodystring—Seen is when the asserter says it became knowable, RFC 3339.
scorecard[].assertion.sourcebodystring—Source names who asserted, as the caller gave it.
scorecard[].assertion.untilbodystring—Until is when the thing stopped being so, RFC 3339, as the asserter gave it.
scorecard[].assertion.valuebodystring—Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
scorecard[].relationshipbodystring—Relationship is the scorecard column, such as mother, father, partner, family or familyAndFriends.
scorecard[].scorebodynumber (double)—Score is the classifier probability in [0,1].
truncatedbodyboolean—Truncated says the read of outgoing or incoming assertions hit the walk ceiling.
typebodystring—Type is the winning type of the entity at the point.

Failure carries the platform error shape — see Errors.

Examples

hanzo graph entity --entity <entity>
import { Configuration, GraphApi } from 'hanzoai';

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

resp, _, err := client.GraphAPI.GraphEntity(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_entity(&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).graphEntity();

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 -X POST https://api.hanzo.ai/v1/graph/entity \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "entity": "<entity>"
     }'

Tool graph, op graphEntity — 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": "graphEntity",
           "input": {
             "entity": "<entity>"
           }
         }
       }
     }'

Graph API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.