The VMware Cloud Usage Report Generator is a self-contained tool that produces interactive HTML reports for your VMware Cloud on AWS usage. It retrieves data directly from the Usage Analytics API and generates a professional, Broadcom-branded report that you can view in any web browser.
The report covers three types of usage:
| Requirement | Details |
| Python | Version 3.7 or later |
| Internet Access | Required to call the VMware Cloud API's and load the Chart.js library in the browser |
| CSP API Refresh Token | A valid VMware Cloud Services refresh token with read access to your organization |
| Organization ID | Your VMware Cloud organization ID (UUID format) |
########-####-####-####-############)Download the vmc_usage_report_generator.zip file provided by your VMware Cloud administrator. Extract it to a folder of your choice:
unzip vmc_usage_report_generator.zipAfter extraction, you will have the following files:
├── generate_usage_report.py # The report generation script
├── requirements.txt # Python dependencies
├── README.md # Quick reference guide
└── logo/
└── broadcom_logo.png # Broadcom logo for the report headerInstall the required Python package:
pip install -r requirements.txtNote: If you encounter an externally-managed-environment error (common on macOS with Homebrew Python), use a virtual environment:
python3 -m venv venv
source venv/bin/activate # On macOS/Linux
# venv\Scripts\activate # On Windows
pip install -r requirements.txtpython3 generate_usage_report.py <refresh_token> <org_id> <start_date> <end_date> [report_types]| Argument | Required | Description |
| refresh_token | Yes | Your CSP API refresh token |
| org_id | Yes | Organization ID in UUID format |
| start_date | Yes | Start date in YYYY-MM-DD format |
| end_date | Yes | End date in YYYY-MM-DD format |
| report_types | No | Comma-separated list: host, spla, misc. Defaults to all three. |
Generate a full report (Host + SPLA + Misc) for February 2026:
python3 generate_usage_report.py "your-refresh-token" "your-org-id" "2026-02-01" "2026-02-28"Generate only the Host usage report:
python3 generate_usage_report.py "your-refresh-token" "your-org-id" "2026-02-01" "2026-02-28" "host"Generate Host and SPLA reports only:
python3 generate_usage_report.py "your-refresh-token" "your-org-id" "2026-02-01" "2026-02-28" "host,spla"Generate a report spanning multiple months (the tool automatically handles date ranges greater than 30 days by splitting into multiple API calls):
python3 generate_usage_report.py "your-refresh-token" "your-org-id" "2025-10-01" "2026-02-28"The script generates an HTML file in the same directory as the script:
usage_report_{org_id}_{start_date}_to_{end_date}_{report_types}.htmlFor example:
usage_report_XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX_2026-02-01_to_2026-02-28_host_misc_spla.htmlOpen the generated HTML file in any modern web browser (Chrome, Firefox, Edge, Safari). The report requires an internet connection to load the Chart.js library for rendering charts.
At the top of the report, you will see summary KPIs:
Each chart section has filter controls:
| Issue | Resolution |
ModuleNotFoundError: No module named 'requests' | Run pip install -r requirements.txt. If using a virtual environment, ensure it is activated. |
error: externally-managed-environment | Use a Python virtual environment (see Installation Step 2). |
403 Forbidden error | Your refresh token may have expired or lacks the required permissions. Generate a new token in the VMware Cloud Services console. |
| Charts appear empty in browser | Ensure you have an internet connection (required to load Chart.js from CDN). Try hard-refreshing the page (Ctrl+Shift+R or Cmd+Shift+R). |
No data available message | Verify the organization ID and date range are correct. Confirm that usage data exists for the specified period. |
| Report file not found after running | The report is saved in the same directory as the generate_usage_report.py script. |
| Logo not showing | Ensure the logo/broadcom_logo.png file is in a logo/ subdirectory relative to the HTML report file. |
Q: How long can the date range be?
A: There is no limit. For date ranges longer than 30 days, the tool automatically splits the requests into 30-day intervals and aggregates the data.
Q: Can I share the HTML report with others?
A: Yes. The HTML file is self-contained (except for the Chart.js CDN dependency and the logo image). To share, send the HTML file along with the logo/ folder. The recipient only needs a web browser and internet access.
Q: Does the tool store my refresh token?
A: No. The refresh token is only used in memory to generate a short-lived access token for the API calls. It is not saved to disk.
Q: What if my token expires while the report is being generated?
A: The tool generates an access token at the start and uses it for all API calls. If the process takes a very long time (unlikely), the access token could expire. Simply re-run the script with a valid refresh token.
Usage APIs:
https://developer.broadcom.com/xapis/vmc-on-aws-general/latest/usage-report/
For issues or questions, contact your VMware Cloud administrator or the Usage Analytics support team.