The attached workflow retrieves some system info from Orchestrator, then performs a simple GET request to /vco/api/about and parses the result to return the version and build number.
Get URL Code:
var vROIP = Config.getNetworkInterfaces().getBindInterface();
var vROPort = Config.getNetworkInterfaces().getBindPort();
var getUrl = "https://"+vROIP+":"+vROPort+"/vco/api/about";
Parse Results Code:
System.debug(aboutResult);
System.debug("============");
var aboutObj = JSON.parse(aboutResult);
System.debug("Version: "+aboutObj["version"]);
var version = aboutObj["version"];
System.debug("Build Number: "+aboutObj["build-number"]);
var build = aboutObj["build-number"];
System.debug("Build Date: "+aboutObj["build-date"]);
System.debug("API Version: "+aboutObj["api-version"]);
Workflow Output parameters:
version (string)
build (string)