Get rest hosts and operations by name
//get REST host by name
//Input: [String]name - The name of the rest host
//Output: [RESTHost]host - The rest host object
var hostsIds = RESTHostManager.getHosts();
for(var currentHostId in hostsIds){
var currentHost = RESTHostManager.getHost(hostsIds[currentHostId]);
System.log(currentHost.name);
if(currentHost.name == name){
host = currentHost;
}
}