List vocabulary

Lists the relations in use, the schema declared for them and the rule that settles a conflict.

GET /v1/graph/vocabulary

Addresshttps://api.hanzo.ai/v1/graph/vocabulary
MethodGET
OperationgraphVocabulary
AuthAuthorization: Bearer $HANZO_API_KEY

Lists the relations in use, the schema declared for them and the rule that settles a conflict.

Time: it takes no as_of or as_known; the schema is the one in force now.

Request

GET /v1/graph/vocabulary takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200graph.graphVocabularyOutok
defaultproblem-detailsrefused

200 body — 8 fields.

FieldInTypeAlwaysDescription
boundbodyinteger (int64)—Bound is the ceiling on one walk.
relationsbodystring[]—Relations is what this organization has actually asserted.
rulebodystring[]—Rule names the terms of the precedence order, in the order they apply.
schemabodygraph.graphDeclared[]—Schema is what the organization has declared, in force now: each relation with a domain or range, asserted as (relation:<name>, domain | range, <type>) and checked against the entities' (<entity>, type, <type>).
schema[].cardinalitybodystring—Cardinality is how many values the relation holds at once: one, or many.
schema[].domainbodystring—Domain is the type the entity asserting it must have.
schema[].rangebodystring—Range is the type the entity it points at must have; a relation with a range is an edge.
schema[].relationbodystring—Relation is the relation declared, without its relation: prefix.

Failure carries the platform error shape — see Errors.

Examples

hanzo graph vocabulary
import { Configuration, GraphApi } from 'hanzoai';

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

resp, _, err := client.GraphAPI.GraphVocabulary(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_vocabulary(&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).graphVocabulary();
curl https://api.hanzo.ai/v1/graph/vocabulary \
  -H "Authorization: Bearer $HANZO_API_KEY"

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

Graph API · All Hanzo APIs · Interactive reference

Was this page useful?