The following script enables REST Operations to be copied from one REST Host to another REST Host
var arrRESTOperations = objRESTHostCLDLTM2C8A51.getOperations();
for ( var i = 0; i < arrRESTOperations.length; i++ )
{
var strRESTOperation = arrRESTOperations[i];
var objRESTOperation = objRESTHostSOURCE.getOperation(strRESTOperation);
System.log(objRESTOperation.name);
var objRESTOperationDESTINATION = objRESTHostDESTINATION.addOperation(objRESTOperation);
RESTHostManager.updateHost(objRESTHostDESTINATION);
}Discover more from Cloud Build Tools
Subscribe to get the latest posts sent to your email.
