MCPcopy Create free account
hub / github.com/Roy3838/Observer / get_all_usage

Function get_all_usage

api/tools_router.py:61–68  ·  view source on GitHub ↗

(Admin) Returns a snapshot of the current in-memory usage database. Requires a valid X-Admin-Key header.

(is_admin: bool = Depends(get_admin_access))

Source from the content-addressed store, hash-verified

59
60@tools_router.get("/tools/usage", tags=["Admin"], summary="Get all current usage data")
61async def get_all_usage(is_admin: bool = Depends(get_admin_access)):
62 """
63 (Admin) Returns a snapshot of the current in-memory usage database.
64 Requires a valid X-Admin-Key header.
65 """
66 # The dependency already handled the security check.
67 # If the code reaches here, 'is_admin' is True.
68 return await get_all_usage_data()
69
70
71@tools_router.post("/tools/send-email", tags=["Tools"])

Callers

nothing calls this directly

Calls 1

get_all_usage_dataFunction · 0.90

Tested by

no test coverage detected