Added filtering to REST API.