implementing endpoint for popularity report