List access

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

Addresshttps://api.hanzo.ai/v1/usage/analytics/access
MethodGET
Operationget_usage_analytics_access
AuthAuthorization: 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.

FieldInTypeRequiredDescription
planquerystring—Plan is a plan id from the live @hanzo/plans catalog.

Response

StatusBodyMeaning
200usage.usageAnalyticsAccessok
defaultproblem-detailsrefused

200 body — 5 fields.

FieldInTypeAlwaysDescription
accessbodyusage.usageAnalyticsGrant—
access.datastorebodyboolean—Datastore is whether the plan may read GET /v1/usage/analytics at all.
access.exportbodyboolean—Export is whether the plan may export the analytics it can read.
access.retentionDaysbodyinteger (int64)—RetentionDays is how far back the plan may read.
planbodystring—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 access
import { 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.UsageAPI.GetUsageAnalyticsAccess(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(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"

MCP reaches usage through the usage tool, which names its 5 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_usage_analytics"
         }
       }
     }'

Usage API · All Hanzo APIs · Interactive reference

Was this page useful?