Created
September 15, 2015 21:17
-
-
Save chelnak/b66fbcb13be45e97f204 to your computer and use it in GitHub Desktop.
Get rest operation 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 operation by name | |
| //Inputs: | |
| //host = RESTHost - The rest host object | |
| //operationName: String - The name of the rest operation | |
| //Outputs: | |
| //operation: RESTOperation - the rest operation object | |
| var operationIds = host.getOperations(); | |
| for(var currentIndex in operationIds){ | |
| var currentOperation = host.getOperation(operationIds[currentIndex]); | |
| System.log(currentOperation.name); | |
| if(currentOperation.name == operationName){ | |
| operation = currentOperation; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment