AMBARI-5799. Add filter by regex and sort capabilities to API. Fix for ClassCastException. (swagle)