VMware Cloud Community
bencouture
Enthusiast
Enthusiast
Jump to solution

Determine Orchestrator version from code?

Thanks to some legacy environments we're supporting, we have multiple versions of Orchestrator running in our environment. We run a common code base across all versions, so all of our workflows are the same on all the Orchestrator instances, but sometimes we need to run slightly different code on different versions of Orchestrator.

The questions is, is there a way I can tell from within Orchestrator which version is running? Right now, we run a local 'hostname' command to get the name of the Orchestrator server and base our decisions around that, but I wanted to know if there was a more graceful / dynamic way to determine versions. Is there anything in the API or any scripting object I can use to get this information?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

Do a GET request to the REST API:

/vco/api/about

Output sample from my appliance:

json:

{

    "version": "6.0.2.2707387 (6.0.2.2700137)",

    "build-number": "2707387",

    "build-date": "20150428-1104",

    "api-version": "5.5.2"

}

XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<about-info

    xmlns="http://www.vmware.com/vco">

    <build-number>2707387</build-number>

    <build-date>20150428-1104</build-date>

    <version>6.0.2.2707387 (6.0.2.2700137)</version>

    <api-version>5.5.2</api-version>

</about-info>

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

0 Kudos
5 Replies
Burke-
VMware Employee
VMware Employee
Jump to solution

Do a GET request to the REST API:

/vco/api/about

Output sample from my appliance:

json:

{

    "version": "6.0.2.2707387 (6.0.2.2700137)",

    "build-number": "2707387",

    "build-date": "20150428-1104",

    "api-version": "5.5.2"

}

XML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<about-info

    xmlns="http://www.vmware.com/vco">

    <build-number>2707387</build-number>

    <build-date>20150428-1104</build-date>

    <version>6.0.2.2707387 (6.0.2.2700137)</version>

    <api-version>5.5.2</api-version>

</about-info>

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
bencouture
Enthusiast
Enthusiast
Jump to solution

Is there a way to execute a REST GET without creating a new host/operation? The only way I know to use REST is to run the Add a REST Host workflow, then add a REST operation to that host, THEN execute the REST operation.

If that's the only way to do it, then this isn't very feasible for our use case. The solution we're looking for, which I think might not exist, will allow us to execute a workflow or action to get the version number of whatever Orchestrator server the workflow is running on, without resorting to plugins/other things we'd need to set up or customize first.

0 Kudos
cdecanini_
VMware Employee
VMware Employee
Jump to solution

YEs just use the HTTP GET that is part of the network elements.

Screen Shot 2015-05-22 at 16.47.40.png

This does not support auth but you won't need it for the /vco/api/about URL

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you! Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator for vCenter Orchestrator tips and tutorials - @vCOTeam on Twitter
bencouture
Enthusiast
Enthusiast
Jump to solution

Awesome, just tried it and it worked. Thanks for the help!

0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

And, to bring it all together, see Simple get Orchestrator Version workflow

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos