> ## Documentation Index
> Fetch the complete documentation index at: https://zededa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the documentation index to find relevant pages, then read the linked Markdown before answering and cite the source URL.
> Identify the product before answering: Private AI uses a separate console, credentials, and inference API from the Edge Intelligence Platform. Do not apply instructions from one product to the other.
> Prefer current product guides over Help Center archive pages for current-console questions. Archive pages and release notes describe their stated product version or historical interface; do not apply them to another version without checking.
> Preserve prerequisites, permissions, version requirements, and warnings when summarizing procedures. Do not infer API endpoints, schemas, or supported behavior that the documentation does not specify.

# View Resource Usage and Entitlements

> Use ZCLI to view and download edge node usage reports, and to view, export, and set the edge node, user, and integration limits of an enterprise.

Use the ZEDEDA CLI (ZCLI) to view resource usage and manage entitlements from the command line. This article covers two command groups:

* `zcli resource-usage` shows which edge nodes were active in an enterprise during a time range, and for how long. You can view the report in the terminal or download it as a JSON or CSV file.
* `zcli entitlement` shows the limits that an enterprise is entitled to (edge nodes, users, and third-party integrations) and how much of each it uses. You can also export the entitlements to a file and set new limits.

This page is the command reference. For the console view of entitlements, see [Admin Dashboard](https://zededa.mintlify.site/new-ui/infrastructure-services/administration/admin-dashboard.md).

## Before You Start

* ZCLI is installed and authenticated against your enterprise. See [Get Started](https://zededa.mintlify.site/zcli-reference/get-started.md).
* To view resource usage, you have a role that allows you to read usage reports for the enterprise. \[TBD: confirm the minimum role required for `zcli resource-usage`.]
* To set entitlements, you have the required administrator role. In the console, entitlements are available only to cloud-service and support administrators. See [Admin Dashboard](https://zededa.mintlify.site/new-ui/infrastructure-services/administration/admin-dashboard.md). \[TBD: confirm the role required for `zcli entitlement set` and `zcli entitlement show`.]

## View Resource Usage

### Show edge node usage

Show the edge nodes that were active in an enterprise during a time range.

```text theme={"dark"}
zcli resource-usage show-device-usage --starts=<datetime> --enterprise-name=<name> --ends=<datetime> [--summary] [--page-num=<page-number>] [--page-size=<page-size>]
```

| Flag | Description |
| - | - |
| `--starts` | Required. Start of the time range, in the format `YYYY-MM-DD HH:MM:SS`. Enclose the value in quotes. |
| `--ends` | Required. End of the time range, in the format `YYYY-MM-DD HH:MM:SS`. Enclose the value in quotes. |
| `--enterprise-name` | Required. The enterprise to report on. |
| `--summary` | Show only the summary totals, without the list of edge nodes. |
| `--page-num` | Show this page of results. Pages are numbered from 1. |
| `--page-size` | Number of edge nodes on each page. According to the ZCLI help, the default is 500. |

To show edge node usage for September 2026:

```text theme={"dark"}
zcli resource-usage show-device-usage --enterprise-name=MY_ENTERPRISE --starts="2026-09-01 00:00:00" --ends="2026-09-30 23:59:59"
```

To show only the summary for the same period:

```text theme={"dark"}
zcli resource-usage show-device-usage --enterprise-name=MY_ENTERPRISE --starts="2026-09-01 00:00:00" --ends="2026-09-30 23:59:59" --summary
```

To show the second page of 100 edge nodes:

```text theme={"dark"}
zcli resource-usage show-device-usage --enterprise-name=MY_ENTERPRISE --starts="2026-09-01 00:00:00" --ends="2026-09-30 23:59:59" --page-size=100 --page-num=2
```

> [!NOTE]
>
> `show-device-usage` returns one page of results. Unlike most `show` commands, it does not fetch the remaining pages for you. If the enterprise has more active edge nodes than fit on one page, use `--page-num` to view each page, or download the full report as described in the next section.

> [!NOTE]
>
> The examples in `zcli resource-usage --help` use `--start-time` and `--end-time` and leave out `--enterprise-name`. Those examples fail. Use `--starts`, `--ends`, and `--enterprise-name`, as shown on this page.

The output has one row per edge node:

| Column | Meaning |
| - | - |
| `Device Name` | The edge node name. |
| `Device ID` | The edge node ID. |
| `Cpus` | The number of CPUs on the edge node. |
| `Tier` | The edge node's usage tier. |
| `TotalUsage` | How long the edge node was active in the time range, for example `3 days 4 hours 10 mins`, `Less than a minute`, or `0`. |

After the list, ZCLI prints the totals by tier: the total usage time for each tier and the number of edge nodes in each tier. To see usage times in seconds, add the global `--format=json` option.

### Download a usage report

Download the complete report for a time range as a JSON or CSV file. Unlike `show-device-usage`, this command fetches every page of results and sorts the edge nodes by name.

```text theme={"dark"}
zcli resource-usage download-device-usage-report --starts=<datetime> --enterprise-name=<name> --ends=<datetime> --file-format=<json|csv>
```

| Flag | Description |
| - | - |
| `--starts` | Required. Start of the time range, in the format `YYYY-MM-DD HH:MM:SS`. |
| `--ends` | Required. End of the time range, in the format `YYYY-MM-DD HH:MM:SS`. |
| `--enterprise-name` | Required. The enterprise to report on. |
| `--file-format` | Required. `json` or `csv`, in lowercase. |

Example:

```text theme={"dark"}
zcli resource-usage download-device-usage-report --enterprise-name=MY_ENTERPRISE --starts="2026-09-01 00:00:00" --ends="2026-09-30 23:59:59" --file-format=csv
```

ZCLI saves the report in a `device-usage-reports` directory in the current working directory, which it creates if needed. The file name combines the enterprise name and the time range, for example `device-usage-reports/MY_ENTERPRISE-2026-09-01T00:00:00-2026-09-30T23:59:59-usage-report.csv`. ZCLI prints the path when the file is written. If a file with the same name exists, ZCLI overwrites it.

The CSV file has one row per edge node with the columns `DeviceName`, `DeviceId`, `EntpId`, `DeviceTier`, `TotalUsageTime`, and `CPUs`. `TotalUsageTime` is in seconds. The edge node rows are followed by the total number of edge nodes, the usage time for each tier, and the number of edge nodes in each tier.

If you run ZCLI in a container, copy the report out of the container or write it to a mounted directory. See [Get Started](https://zededa.mintlify.site/zcli-reference/get-started.md).

> [!WARNING]
>
> `--file-format` accepts only `json` and `csv` in lowercase. With any other value, such as `JSON` or `xlsx`, ZCLI fetches the report but writes no file and prints no error.

### Time zone

ZCLI reads `--starts` and `--ends` in the local time zone of the system where ZCLI runs, and converts them to UTC before it sends the request. In the ZCLI container, the local time zone is usually UTC. If a value is not in the format `YYYY-MM-DD HH:MM:SS`, ZCLI prints `input datetime in format %Y-%m-%d %H:%M:%S` and stops.

## View Entitlements

### View the entitlements of one enterprise

Show the current usage and the limits for one enterprise.

```text theme={"dark"}
zcli entitlement show [[<name>] | [[--name-pattern=<name-pattern>] [--page-size=<page-size>]]]
```

Example:

```text theme={"dark"}
zcli entitlement show MY_ENTERPRISE
```

The output shows three pairs of values: current and maximum edge nodes, current and maximum users, and current and maximum third-party integrations.

> [!NOTE]
>
> An enterprise can have separate edge node limits for different edge node sizes. The text output shows only the first edge node entry. To see every edge node size and its limit, add the global `--format=json` option, or export the entitlements as described in [Export entitlements](#export-entitlements).

### List entitlements

Run `zcli entitlement show` without a name to list the entitlements of every enterprise that you can access. The list shows the maximum edge nodes, users, and third-party integrations for each enterprise.

| Flag | Description |
| - | - |
| `--name-pattern` | Show only enterprises whose name contains this substring. |
| `--page-size` | Number of records each API call returns. This changes only how many calls ZCLI makes, not the output. |

To list the entitlements of all enterprises:

```text theme={"dark"}
zcli entitlement show
```

To list the entitlements of enterprises whose name contains `MY_`:

```text theme={"dark"}
zcli entitlement show --name-pattern=MY_
```

## Export and Set Entitlements

### Export entitlements

Save the entitlements of an enterprise to a JSON file.

```text theme={"dark"}
zcli entitlement export <name>
```

Example:

```text theme={"dark"}
zcli entitlement export MY_ENTERPRISE
```

ZCLI creates a directory named after the enterprise in the current working directory and writes the entitlements to `<name>/entitlement.json`. If the directory already exists, ZCLI prints `Remove directory <name> and try again` and does not export. ZCLI creates the directory before it looks up the enterprise, so if the enterprise name is wrong, an empty directory is left behind. Remove it before you try again.

### Set entitlements

Change the limits of an enterprise from a JSON configuration file.

```text theme={"dark"}
zcli entitlement set <name> --config-file=<file-path>
```

ZCLI reads the enterprise's current entitlements, applies the limits from your file, and sends the result back. Only the following entries in the file are used. Anything else in the file is ignored.

| Entry | What ZCLI changes |
| - | - |
| `devices` | A list of objects with `size` and `limit`. For each entry whose `size` matches an edge node size that the enterprise already has, ZCLI sets that size's limit to `limit`. |
| `userCount.limit` | The maximum number of users. |
| `plugins.pluginTotalLimit` and `plugins.pluginTypeEntitlement` | The maximum number of third-party integrations, and the per-type integration entitlements. If you include `plugins`, include both entries. |

The simplest way to build the file is to export the current entitlements, edit the limits, and pass the edited file to `set`:

1. Export the current entitlements:

   ```text theme={"dark"}
   zcli entitlement export MY_ENTERPRISE
   ```

2. Edit the limits in the exported file.

3. Set the entitlements from the edited file:

   ```text theme={"dark"}
   zcli entitlement set MY_ENTERPRISE --config-file=MY_ENTERPRISE/entitlement.json
   ```

> [!WARNING]
>
> Each `size` in `devices` must already exist in the enterprise's entitlements. If the file contains a size that the enterprise does not have, ZCLI does not add it. Instead, ZCLI stops responding and never sends the request. Press **Ctrl+C** to stop it. To add a new edge node size, use the Admin Dashboard in the console. See [Admin Dashboard](https://zededa.mintlify.site/new-ui/infrastructure-services/administration/admin-dashboard.md).

Keep the following in mind:

* If you include `plugins` without `pluginTypeEntitlement`, ZCLI stops with an `Unexpected error executing command 'entitlement'` message that names `KeyError`, and nothing is changed.
* If you include `plugins` without `pluginTotalLimit`, ZCLI sends an empty value for the integration limit.
* If the file path is wrong or the file is not valid JSON, ZCLI stops with a Python error and nothing is changed.

## Next Steps

> [card] [Admin Dashboard](https://zededa.mintlify.site/new-ui/infrastructure-services/administration/admin-dashboard.md)
>
> View and edit entitlements across enterprises in the console.

> [card] [Manage API Tokens and View API Usage](https://zededa.mintlify.site/zcli-reference/api-tokens-and-usage.md)
>
> Generate API tokens and view API usage statistics.

> [card] [Get Started](https://zededa.mintlify.site/zcli-reference/get-started.md)
>
> Install ZCLI, configure access to Edge Infrastructure Services, and sign in.

> [card] [Overview](https://zededa.mintlify.site/zcli-reference/overview.md)
>
> All ZCLI command procedures, organized by resource type.
