Add filter logic to REST service