List share

Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled.

GET /v1/share

Addresshttps://api.hanzo.ai/v1/share
MethodGET
Operationget_share
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the tunnel shares the caller's org currently has open, across every environment that org has enabled. It is a READ and it degrades honestly: an unconfigured deployment, an org that has not provisioned yet, and an unreachable controller all answer an EMPTY list at 200 rather than an error, so the console never error-toasts on load.

Request

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

Response

StatusBodyMeaning
200share.sharesOutok
defaultproblem-detailsrefused

200 body — 6 fields.

FieldInTypeAlwaysDescription
sharesbodyshare.shareView[]—Shares is the org's active shares — empty rather than absent when there are none, or when the controller cannot be reached.
shares[].backendbodystring—Backend is the local endpoint the share proxies to.
shares[].backendModebodystring—BackendMode is how the tunnel serves the backend, e.g. proxy or web.
shares[].createdAtbodyinteger (int64)—CreatedAt is when the share was opened, unix seconds.
shares[].tokenbodystring—Token is the share's own identifier, the leaf of its public URL.
shares[].urlbodystring—URL is the share's public address, rendered from the deployment's URL template.

Failure carries the platform error shape — see Errors.

Examples

hanzo share get
import { Configuration, ShareApi } from 'hanzoai';

const api = new ShareApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getShare();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import ShareApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = ShareApi(client).get_share()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.ShareAPI.GetShare(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, share_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = share_api::get_share(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.ShareApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new ShareApi(client).getShare();
curl https://api.hanzo.ai/v1/share \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches share through the share tool, which names its 2 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_shares"
         }
       }
     }'

Share API · All Hanzo APIs · Interactive reference

Was this page useful?