Echoes a plan's resolved analytics entitlement so a dashboard can configure…
Echoes a plan's resolved analytics entitlement so a dashboard can configure itself against the LIVE catalog instead of hardcoding tier numbers.
GET /v1/usage/analytics/access
| Address | https://api.hanzo.ai/v1/usage/analytics/access |
| Method | GET |
| Operation | get_usage_analytics_access |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Echoes a plan's resolved analytics entitlement so a dashboard can configure itself against the LIVE catalog instead of hardcoding tier numbers. An empty plan resolves the free floor, and a catalog resolution failure serves that same floor rather than erroring — so this always answers 200. It is a read-only contract echo and carries no tenant data.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
plan | query | string | — | Plan is a plan id from the live @hanzo/plans catalog. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | usageAnalyticsAccess | ok |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
access | body | usageAnalyticsGrant | — | |
access.datastore | body | boolean | — | Datastore is whether the plan may read GET /v1/usage/analytics at all. |
access.export | body | boolean | — | Export is whether the plan may export the analytics it can read. |
access.retentionDays | body | integer | — | RetentionDays is how far back the plan may read. |
plan | body | string | — | Plan echoes the plan id that was resolved, exactly as it was asked for. |
Failure carries the platform error shape — see Errors.
Examples
hanzo usage analytics accessimport { Configuration, UsageApi } from 'hanzoai';
const api = new UsageApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getUsageAnalyticsAccess();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import UsageApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = UsageApi(client).get_usage_analytics_access()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.UsageAPI.GetUsageAnalyticsAccess(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, usage_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = usage_api::get_usage_analytics_access(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.UsageApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new UsageApi(client).getUsageAnalyticsAccess();curl https://api.hanzo.ai/v1/usage/analytics/access \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches usage through the usage tool, which names its 5 operations with its own verbs — this one among them, under a name only the door 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_usage_analytics"
}
}
}'How is this guide?