<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Clarification on ZBFW Viptela API Endpoints in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4837607#M8784</link>
    <description>&lt;P&gt;I am not a 100% sure on this, but think it would be as below. I would consider looking at the SDK&amp;nbsp;&lt;A href="https://developer.cisco.com/docs/sdwan/#!overview" target="_blank"&gt;https://developer.cisco.com/docs/sdwan/#!overview&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
  "name": "My Policy",
  "description": "This policy allows all traffic between the in and out zones, and then denies all traffic between the in and dmz zones",
  "zones": [
    {
      "name": "in",
      "type": "in"
    },
    {
      "name": "out",
      "type": "out"
    },
    {
      "name": "dmz",
      "type": "dmz"
    }
  ],
  "services": [],
  "action": "allow",
  "sequences": [
    {
      "sequence": 32,
      "zones": [
        {
          "name": "in",
          "type": "in"
        },
        {
          "name": "out",
          "type": "out"
        }
      ],
      "services": [],
      "action": "allow"
    },
    {
      "sequence": 33,
      "zones": [
        {
          "name": "in",
          "type": "in"
        },
        {
          "name": "dmz",
          "type": "dmz"
        }
      ],
      "services": [],
      "action": "deny"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 12:10:52 GMT</pubDate>
    <dc:creator>bigevilbeard</dc:creator>
    <dc:date>2023-05-17T12:10:52Z</dc:date>
    <item>
      <title>Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835123#M8778</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;I am trying to write a script to create/update zone based firewall using Viptela API. Since the API documentation is incomplete, I would like to know a couple of details&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. For POST /template/policy/definition/zonebasedfw/preview,&lt;BR /&gt;I would like to know about the format of the required json data.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2. Regarding PUT /template/policy/definition/zonebasedfw/{policyID}&lt;/P&gt;
&lt;P&gt;I understand that this API endpoint is used to both create and edit definitions for a given policyID.&lt;BR /&gt;Is it correct to understand that when creating a new definition, the json body does not include a sequence ID, and when editing an existing definition, the sequence ID is specified?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 21:27:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835123#M8778</guid>
      <dc:creator>akshayaravi</dc:creator>
      <dc:date>2023-05-26T21:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835205#M8779</link>
      <description>&lt;P&gt;Thats typically how policy's work yes. I would also cross post this&amp;nbsp;&lt;A href="https://community.cisco.com/t5/custom/page/page-id/customFilteredByMultiLabel?board=discussions-sd-wan&amp;amp;labels=sd-wan%20automation" target="_self"&gt;HERE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 06:16:47 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835205#M8779</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-05-15T06:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835345#M8780</link>
      <description>&lt;P&gt;Thanks for the confirmation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate if I could get an example json body that can be used with the POST&amp;nbsp;&lt;SPAN&gt;/template/policy/definition/zonebasedfw/preview.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 08:10:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835345#M8780</guid>
      <dc:creator>akshayaravi</dc:creator>
      <dc:date>2023-05-15T08:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835402#M8781</link>
      <description>&lt;P&gt;Never seen an example of this, i would test this via the UI and capture the payload via developer tools in Chrome to be sure what is being sent.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 09:54:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4835402#M8781</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-05-15T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4836670#M8782</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1512684"&gt;@akshayaravi&lt;/a&gt;&amp;nbsp;i had a dig around some old code i had and found this, the&lt;SPAN&gt;&amp;nbsp;template defines a zone-based firewall policy that allows all traffic between hosts in the same zone and denies all traffic to the untrusted zone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
  "name": "Zone-Based Firewall Preview",
  "description": "This template defines a zone-based firewall policy.",
  "zones": [
    {
      "name": "Trusted",
      "description": "This zone represents trusted traffic.",
      "subnets": [
        "10.0.0.0/8"
      ]
    },
    {
      "name": "Untrusted",
      "description": "This zone represents untrusted traffic.",
      "subnets": [
        "0.0.0.0/0"
      ]
    }
  ],
  "rules": [
    {
      "name": "Allow All Internal Traffic",
      "description": "This rule allows all traffic between hosts in the same zone.",
      "source_zone": "Trusted",
      "destination_zone": "Trusted",
      "action": "ALLOW"
    },
    {
      "name": "Deny All Traffic to Untrusted Zone",
      "description": "This rule denies all traffic to the untrusted zone.",
      "source_zone": "*",
      "destination_zone": "Untrusted",
      "action": "DENY"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 09:59:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4836670#M8782</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-05-16T09:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4837143#M8783</link>
      <description>&lt;P&gt;Thank you for the reply! I guess I get an outline of what can be used as the body. I'll try out variations of this.&lt;/P&gt;&lt;P&gt;And sorry for lot of questions, but again I have a clarification around PUT /template/policy/definition/zonebasedfw/{policyID} endpoint.&lt;/P&gt;&lt;P&gt;In case I use this&amp;nbsp;API endpoint to create a new definition for a given policyID and I want to insert this new definition in between the existing order of rules instead of adding it at the end. (I assume there is an order of evaluation)&lt;/P&gt;&lt;P&gt;For example, I want to add it in between the current seq 31 rule and seq 41 rule. (This would mean sequence id's of all rules below the new rule would change)&lt;/P&gt;&lt;P&gt;How would I go about implementing this via API ?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 02:12:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4837143#M8783</guid>
      <dc:creator>akshayaravi</dc:creator>
      <dc:date>2023-05-17T02:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Clarification on ZBFW Viptela API Endpoints</title>
      <link>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4837607#M8784</link>
      <description>&lt;P&gt;I am not a 100% sure on this, but think it would be as below. I would consider looking at the SDK&amp;nbsp;&lt;A href="https://developer.cisco.com/docs/sdwan/#!overview" target="_blank"&gt;https://developer.cisco.com/docs/sdwan/#!overview&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{
  "name": "My Policy",
  "description": "This policy allows all traffic between the in and out zones, and then denies all traffic between the in and dmz zones",
  "zones": [
    {
      "name": "in",
      "type": "in"
    },
    {
      "name": "out",
      "type": "out"
    },
    {
      "name": "dmz",
      "type": "dmz"
    }
  ],
  "services": [],
  "action": "allow",
  "sequences": [
    {
      "sequence": 32,
      "zones": [
        {
          "name": "in",
          "type": "in"
        },
        {
          "name": "out",
          "type": "out"
        }
      ],
      "services": [],
      "action": "allow"
    },
    {
      "sequence": 33,
      "zones": [
        {
          "name": "in",
          "type": "in"
        },
        {
          "name": "dmz",
          "type": "dmz"
        }
      ],
      "services": [],
      "action": "deny"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:10:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/clarification-on-zbfw-viptela-api-endpoints/m-p/4837607#M8784</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2023-05-17T12:10:52Z</dc:date>
    </item>
  </channel>
</rss>

