Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

REST API JSON VC:VmFolder

$
0
0

I am attempting to kick off a workflow via REST/JSON. The workflow takes two inputs:

     1. a string variable called vmName - self explanatory.

     2. a VC:VmFolder variable called FolderName - I have to get the VMs Folder in order to do some cloning. the issue is that I only have a folder name since that is the interface level my users are working at.

 

Once the Workflow has been called it kicks off a slew of cloning, snapshot, etc activity.

 

I pass in the following JSON and I get back an error message complaining about the request being "Syntactically Incorrect".

 

I know my issue is with the way the JSON is structured with regard to the VC:VmFolder as that is an object and not a basic type (string, number). How do I structure the call correctly and more importantly is there a good set of documentation or reference website that will guide me down the right path in the future when dealing with this or other complex data types / objects - I want to learn to fish?

 

 

 

  1.     "parameters"
  2.     [ 
  3.         { 
  4.             "name":"vmName"
  5.             "type":"string"
  6.             "value":{"string":{"value":"MyVMName"}} 
  7.         }, 
  8.         { 
  9.             "name":"vcFolder"
  10.             "type":"VC:VmFolder"
  11.             "value":{"VC:VmFolder":{"value":"folderName"}} 
  12.         } 
  13.  
  14.  
  15.     ] 

 

Any help is greatly appreciated.

 

Thank you.


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>