Fixed handling of multiple resources, template parameters in hostname and sorting of API list in dialog