Returns the caller's org overlay network on the Zero Trust fabric.
Returns the caller's org overlay network on the Zero Trust fabric.
GET /v1/network
| Address | https://api.hanzo.ai/v1/network |
| Method | GET |
| Operation | get_network |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns the caller's org overlay network on the Zero Trust fabric.
The org has at most ONE overlay, projected from the edge-routers tagged with its "org-<org>" role attribute: nodes is the real router count and status is "connected" once at least one router has dialed home, "provisioning" while none has. An org with no routers gets an empty list, never a fabricated network.
The read degrades rather than erroring: a deployment with no ZT credential, and a controller that cannot be reached, both answer 200 with an empty list so the console's Networks page renders a clean empty state instead of an error.
Request
GET /v1/network takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | networkList | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
networks | body | networkView[] | — | Networks holds the org's overlay network, or is empty when the org has no edge-routers on the fabric (no nodes → no network, never a fabricated one). |
networks[].id | body | string | — | ID is the org-derived id of the overlay network — the key GET /v1/network/{id} addresses. |
networks[].name | body | string | — | Name is the org the overlay belongs to. |
networks[].nodes | body | integer | — | Nodes is how many edge-routers the org has on the fabric. |
networks[].status | body | string | — | Status is "connected" once at least one of the org's edge-routers is online, else "provisioning" (routers exist but none has dialed home). |
Failure carries the platform error shape — see Errors.
Examples
hanzo networks listimport { Configuration, NetworkApi } from 'hanzoai';
const api = new NetworkApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getNetwork();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import NetworkApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = NetworkApi(client).get_network()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.NetworkAPI.GetNetwork(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, network_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = network_api::get_network(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.NetworkApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new NetworkApi(client).getNetwork();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 https://api.hanzo.ai/v1/network \
-H "Authorization: Bearer $HANZO_API_KEY"Tool zt, op get_network — 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": "zt",
"arguments": {
"op": "get_network",
"input": {}
}
}
}'How is this guide?