The closed vocabularies and the precedence rule that resolves a conflict
Publishes the closed vocabularies and the precedence rule that resolves a conflict between two sources.
GET /v1/label/vocabulary
| Address | https://api.hanzo.ai/v1/label/vocabulary |
| Method | GET |
| Operation | riskLabelVocabulary |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Publishes the closed vocabularies and the precedence rule that resolves a conflict between two sources.
A precedence rule nobody can read is a rule nobody can audit or dispute, and the whole defensibility of a contested label rests on being able to say why one assertion beat another. The order returned here is derived from the same declaration the resolver reads — it is not a description of it.
Request
GET /v1/label/vocabulary takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | riskLabelVocabulary | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
dispositions | body | string[] | — | Dispositions is the closed set a write's disposition must be drawn from, published in full so a caller can validate a batch before filing it instead of… |
kinds | body | string[] | — | Kinds, Dispositions and Sources are the closed vocabularies. |
precedence | body | string[] | — | Precedence is the sources in the order that resolves a conflict, strongest first. |
retention | body | integer | — | Retention is the platform floor in days: no tenant may dispose of a label younger than this, because a label can be the input to an adverse action. |
rule | body | string[] | — | Rule states the tie-breaks below rank, in order, so a caller reading a contested resolution can reproduce it. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, LabelApi } from 'hanzoai';
const api = new LabelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskLabelVocabulary();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LabelApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LabelApi(client).risk_label_vocabulary()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.LabelAPI.RiskLabelVocabulary(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, label_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = label_api::risk_label_vocabulary(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LabelApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new LabelApi(client).riskLabelVocabulary();curl https://api.hanzo.ai/v1/label/vocabulary \
-H "Authorization: Bearer $HANZO_API_KEY"Tool label, op riskLabelVocabulary — 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": "label",
"arguments": {
"op": "riskLabelVocabulary",
"input": {}
}
}
}'How is this guide?