# List access

URL: https://docs.hanzo.ai/docs/openapi/usage/get-usage-analytics-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`

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

|               |                                                  |
| ------------- | ------------------------------------------------ |
| **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`     | usage.usageAnalyticsAccess | ok      |
| `default` | problem-details            | refused |

`200` body — 5 fields.

| Field                  | In   | Type                      | Always | Description                                                             |
| ---------------------- | ---- | ------------------------- | ------ | ----------------------------------------------------------------------- |
| `access`               | body | usage.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 (int64)           | —      | 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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo usage analytics access
```

**SDK**

**.ts**

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

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

**.py**

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

**.go**

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

**.rs**

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

**.java**

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

**HTTP**

```bash
curl https://api.hanzo.ai/v1/usage/analytics/access \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

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:

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