docs: update readme

This commit is contained in:
Magel, Denis
2025-09-18 16:39:54 +02:00
parent 7d4b42df11
commit e73a18e981
2 changed files with 16 additions and 2 deletions

View File

@@ -1,3 +1,17 @@
# generic_api_endpoint
Hackathon API endpoint
Hackathon API endpoint
## management summary // usecase
This API acts as a middelware for service portals and frontends (like SNOW), that can retrieve data via REST API. It manages metadata.
## ideas for future
- store the data in redis on initialization or on first request
- also first query redis, and not directly ONTAP
- documentation -> make it understandable, so that users will use it!
- add capability to apply filters/conditions on the return
- Alexeys
- add capability for finding best clusters, volumes
- get credentials from credential-mgmt-system
-

View File

@@ -16,7 +16,7 @@ async def get_aggregates(request: Request, metric: str = "relative") -> List[Agg
# You can use the metric parameter to filter or modify results as needed
# For now, just return the same data and show metric usage
logger.debug(f"Metric used: {metric}")
__aggregates = await get_data_from_ontap(request, logger, "storage/aggregates", "fields=name,uuid,space,node,home_node")
__aggregates = await get_data_from_ontap(request, logger, "storage/aggregates", "fields=*")
pprint(__aggregates)
if metric == MetricEnum.relative:
__aggregates = sorted(__aggregates, key=lambda r: r["space"]["block_storage"].get("used_percent"), reverse=True)