Write a function that calls a paginated REST API endpoint, filters the results based on specific criteria, and returns the aggregated data.