# List vocabulary

URL: https://docs.hanzo.ai/docs/openapi/graph/graphvocabulary

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

`GET /v1/graph/vocabulary`

> [Graph →](https://docs.hanzo.ai/docs/openapi/graph) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                            |
| ------------- | ------------------------------------------ |
| **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:&lt;name&gt;`, `domain` \| `range`, `&lt;type&gt;`) and checked against the entities' (`&lt;entity&gt;`, `type`, `&lt;type&gt;`). |
| `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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo graph vocabulary
```

**SDK**

**.ts**

```ts
import { Configuration, GraphApi } from 'hanzoai';

const api = new GraphApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.graphVocabulary();
```

**.py**

```python
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()
```

**.go**

```go
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
}
```

**.rs**

```rust
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?;
```

**.java**

```java
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();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/graph/vocabulary \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `graph`, op `graphVocabulary` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
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](https://docs.hanzo.ai/docs/openapi/graph) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
