Usage Reporting
The Flywheel SDK provides endpoints for querying storage and compute usage across the site. These endpoints require admin permissions.
Overview
Flywheel offers two categories of usage reports:
- Storage reports — show how much data is stored at the site and project level
- Usage reports — show job activity and compute consumption over time
Site-wide storage report
fw.get_site_report() returns a summary of storage consumption across all groups and projects on the site:
Project-level storage report
fw.get_project_report() returns a breakdown of storage usage by one or more projects. Optionally, start_date and end_date can be provided to filter by date:
from datetime import datetime
--8 < --"test_docs_admin_concepts.py:get_project_report"
Usage report by month
fw.get_usage_report() returns job-level usage statistics for a given month. If no month is specified, the current month is used:
--8 < --"test_docs_admin_concepts.py:get_usage_report_project"
Daily usage reports
For finer-grained breakdowns, use the daily usage endpoint:
Aggregating storage across projects
A common pattern for capacity planning is to iterate through projects and aggregate their storage into a summary:
--8 < --"test_docs_admin_concepts.py:aggregate_storage"
Checking usage data availability
Before querying historical usage, check which date ranges have data available:
Related pages
- Usage Report product documentation - more information on usage reporting, including how to generate a report from the UI