Polo Legacy — API Endpoints
All endpoints return server-rendered HTML (htmxido → HTML). HTMX partial updates
use the same endpoints with HX-Request headers.
Route Prefixes
| Prefix | Router File | Purpose |
|---|---|---|
/ | lambda_function.py | Home page |
/data | routes/data.py | Resource browser |
/stats | routes/stats.py | Analytics (mostly stubs) |
/actions | routes/actions.py | Cleanup recommendations |
/dashboards | routes/dashboards.py | Cost reports |
/budget | routes/budget.py | Budget tracking |
/query | routes/query.py | Freeform data queries |
/diagram | routes/diagram.py | Infrastructure visualization |
Data Routes (/data)
| Method | Path | Description |
|---|---|---|
| GET | /data/ | Index (lazy-loads subsections) |
| GET | /data/all | All resources at once |
| GET | /data/users | Cognito users (controller account) |
| GET | /data/accounts | Customer accounts |
| GET | /data/indexes | Marqo indexes |
| GET | /data/clusters | K8s clusters |
| GET | /data/instances | Running EC2 instances |
| GET | /data/volumes | EBS volumes |
| GET | /data/vpcs | VPCs |
| GET | /data/subnets | Subnets |
| GET | /data/nats | NAT gateways |
| GET | /data/ips | Public IPv4 (alive only) |
| GET | /data/elbs | Load balancers |
| GET | /data/buckets | S3 buckets |
| GET | /data/notebooks | SageMaker notebooks |
| GET | /data/other | Miscellaneous resources |
| GET | /data/savingsplans | AWS Savings Plans |
| GET | /data/prices | Instance pricing table |
| GET | /data/resources/<short_key> | Single resource detail + metrics |
| GET | /data/resources/<short_key>/tags | Resource tags as table |
| GET | /data/resources/<short_key>/children | Child resource tree |
| GET | /data/metrics/<short_key> | CloudWatch metrics for resource |
Actions Routes (/actions)
| Method | Path | Description |
|---|---|---|
| GET | /actions/ | Index |
| GET | /actions/prune_clusters | Cluster deletion candidates |
| GET | /actions/stop_notebooks | Notebook stopping candidates |
| GET | /actions/prune_volumes | Volume deletion candidates |
| GET | /actions/prune_nats | NAT gateway deletion candidates |
| GET | /actions/prune_ips | IP deletion candidates |
| GET | /actions/dev_indexes | Persistent dev indexes |
| GET | /actions/unroled_instances | EC2 without IAM roles |
| GET | /actions/orphaned_instances | Instances not in any index |
Dashboard Routes (/dashboards)
| Method | Path | Query Params | Description |
|---|---|---|---|
| GET | /dashboards/ | Index | |
| GET | /dashboards/cost | where_aws_id, where_type, etc. | Cost breakdown |
| GET | /dashboards/cost_series | Cost trends over time |
Budget Routes (/budget)
| Method | Path | Query Params | Description |
|---|---|---|---|
| GET | /budget/ | where_aws_id | Budget tracking with account filter |
Query Routes (/query)
| Method | Path | Description |
|---|---|---|
| GET | /query/ | Query builder UI (SQL textarea) |
| POST | /query/results | Execute query (base64-encoded JSON body) |
Stats Routes (/stats) — Mostly Stubs
| Method | Path | Description |
|---|---|---|
| GET | /stats/ | Index |
| GET | /stats/all | All stats |
| GET | /stats/clusters | Cluster stats |
| GET | /stats/indexes | Index stats |
| GET | /stats/role | Role analysis |
| GET | /stats/category | Category breakdown |
| GET | /stats/customer-compute | Customer compute |
| GET | /stats/data-quality | Data quality |
Diagram Routes (/diagram)
| Method | Path | Description |
|---|---|---|
| GET | /diagram/ | Interactive infrastructure diagram |
Static Routes
| Method | Path | Description |
|---|---|---|
| GET | /static/{path} | CSS, JS, images (MIME-detected) |