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

ISSUE: Can not create an (edge) Firewall rule with the REST API

$
0
0

Dear,

 

I am trying to create a simple and basic edge firewall rule with the use of REST API.

 

I am using the REST API guide as a reference on page 158.


edge-fw-rule.png

I am using the  following (simple) code in my REST API client (with the correct Content-Type (application/xml)):

 

<rule>

  <ruleTag></ruleTag>

  <name>edge5-rest-rule</name>

  <source>any</source>

  <destination>any</destination>

  <application>any</application>

  <matchTranslated>true</matchTranslated>

  <direction>in</direction>

  <action>deny</action>

  <enabled>false</enabled>

  <loggingEnabled>true</loggingEnabled>

  <description>rest-api-rule</description>

</rule>

 

The error message that I receive is the following:

 

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

<error>

    <details>Invalid request. Could not find mapping for element rule.</details>

    <errorCode>223</errorCode>

</error>

 

The full screenshot of my REST API action is in the screenshot below:

 

full-request.png

 

Does anyone know what I am doing wrong here?

 

Thanks!


Viewing all articles
Browse latest Browse all 168455

Trending Articles



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