2 Replies Latest reply on Dec 5, 2015 12:08 AM by i1wan

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

    i1wan Novice
    vExpert

      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!