List vocabulary
Lists the relations in use, the schema declared for them and the rule that settles a conflict.
GET /v1/graph/vocabulary
| Address | https://api.hanzo.ai/v1/graph/vocabulary |
| Method | GET |
| Operation | graphVocabulary |
| Auth | Authorization: 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
| Status | Body | Meaning |
|---|---|---|
200 | graph.graphVocabularyOut | ok |
default | problem-details | refused |
200 body — 8 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
bound | body | integer (int64) | — | Bound is the ceiling on one walk. |
relations | body | string[] | — | Relations is what this organization has actually asserted. |
rule | body | string[] | — | Rule names the terms of the precedence order, in the order they apply. |
schema | body | graph.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[].cardinality | body | string | — | Cardinality is how many values the relation holds at once: one, or many. |
schema[].domain | body | string | — | Domain is the type the entity asserting it must have. |
schema[].range | body | string | — | Range is the type the entity it points at must have; a relation with a range is an edge. |
schema[].relation | body | string | — | Relation is the relation declared, without its relation: prefix. |
Failure carries the platform error shape — see Errors.
Examples
CLI
SDK
HTTP
MCP
hanzo graph vocabulary.ts
.py
.go
.rs
.java
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": {}
}
}
}'Was this page useful?