Skip to content

Module API.download_metrics

Variables

router

Functions

get_stats

def get_stats(
    start_date: str = Query(PydanticUndefined),
    end_date: str = Query(PydanticUndefined),
    group_by: str = Query(day),
    _: bool = Depends(staff_required)
)
Retrieve download metrics summary statistics.

  • start_date: The start date for the metrics, in the format "YYYY-MM-DD".
  • end_date: The end date for the metrics, in the format "YYYY-MM-DD".
  • group_by: The time period to group the metrics by. Can be "day", "month", "quarter", or "year".

The API requires admin authentication to access.