Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 258290

Create Rule with valueType "Substring" via API

$
0
0

Hi everyone

 

I'm trying to create a Rule via the API. According to the documentation, the body needs to be provided as follows:

 

<rule xmlns="http://www.vmware.com/UM"><vcServerId>1</vcServerId><customerName>CustomerTest</customerName><objectType>VM</objectType><valueType>Unique ID</valueType><value>vm-21</value></rule>

 

This works fine for rules with valuetype "Unique ID". But i need to create a rule with the valuetype Substring and I cannot figure out, how I need to provide the body. If I send it according to the documentation i get the response that rules with valueType Substring mustn't provide a vCenter ID. If I send the body without the vcServerID Element i get the response that this is a mandatory element. If I leave it blank I get a parsing error back. Can anyone point me in the right direction? We use version 3.6.1.

 

Thanks!


Viewing all articles
Browse latest Browse all 258290


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