VMware Cloud Community
michael_stefani
Enthusiast
Enthusiast
Jump to solution

REST Output

I'm pretty new to REST and I've figured out how to execute a workflow via REST.  Works great, but what I'm trying to figure out is how to get results back.  I've got a workflow that outputs all the VMs in a cluster into an output parameter called vmArray.  I can execute the workflow via REST just fine.  I can see the execution staus, etc.  How do I actually retrieve the contents of the variable though?  I couldn't find an example of this online.  Any help is appreciated.  Thanks,

Mike

1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

See my article here: http://bit.ly/restvco

Look in the section: Expected Results from POST

The Location header will provide you with the workflow token. Perform a GET against that url to see the output of your workflow (this should have similar info to what you see when viewing a workflow execution in the vRO client ... only in XML or JSON depending on how you've set your headers Smiley Happy

Hope that helps

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

Reply
0 Kudos
3 Replies
Burke-
VMware Employee
VMware Employee
Jump to solution

See my article here: http://bit.ly/restvco

Look in the section: Expected Results from POST

The Location header will provide you with the workflow token. Perform a GET against that url to see the output of your workflow (this should have similar info to what you see when viewing a workflow execution in the vRO client ... only in XML or JSON depending on how you've set your headers Smiley Happy

Hope that helps

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
Reply
0 Kudos
michael_stefani
Enthusiast
Enthusiast
Jump to solution

Thanks I figured out my mistake right as you were replying.  I had an error in my WF and the array that was being returned was empty.  Kind of hard seeing the items in your empty array Smiley Happy.  Thanks for the response!

Mike

Reply
0 Kudos
michael_stefani
Enthusiast
Enthusiast
Jump to solution

And thanks for the guide.  That's what I used to get into calling vCO from REST.  Awesome guide!