Last active
September 16, 2015 07:18
-
-
Save chelnak/b2d11c07f6daccd139ac to your computer and use it in GitHub Desktop.
Get rest hosts and operations by name
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //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; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment