

@decorators.list_route()
def count_history(self, request, *args, **kwargs):
    '\n        To get a historical data of events amount - run **GET** against */api/events/count/history/*.\n        Endpoint support same filters as events list.\n        More about historical data - read at section *Historical data*.\n\n        Response example:\n\n        .. code-block:: javascript\n\n            [\n                {\n                    "point": 141111111111,\n                    "object": {\n                        "count": 558\n                    }\n                }\n            ]\n        '
    queryset = self.filter_queryset(self.get_queryset())
    mapped = {
        'start': request.query_params.get('start'),
        'end': request.query_params.get('end'),
        'points_count': request.query_params.get('points_count'),
        'point_list': serializer.query_params.getlist('point'),
    }
    serializer = core_serializers.HistorySerializer(data={k: v for (k, v) in mapped.items() if v})
    serializer.is_valid(raise_exception=True)
    timestamp_ranges = [{
        'end': point_date,
    } for point_date in serializer.get_filter_data()]
    aggregated_count = queryset.aggregated_count(timestamp_ranges)
    return response.Response([{
        'point': int(ac['end']),
        'object': {
            'count': ac['count'],
        },
    } for ac in aggregated_count], status=status.HTTP_200_OK)

dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/logging/views.py EventViewSet.count_history/VarMisuse@82/265 `request`->`serializer`