<?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: correct endpoint for firewall rules? in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427952#M4627</link>
    <description>&lt;P&gt;Or use the a posteriori knowledge, that the default rule is always at the end of the list and simpy "pop it". &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;# Remove Default Rule entry
FirewallRules['rules'].pop(-1)&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 07 Feb 2023 11:36:13 GMT</pubDate>
    <dc:creator>Rasmus Hoffmann Birkelund</dc:creator>
    <dc:date>2023-02-07T11:36:13Z</dc:date>
    <item>
      <title>correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427925#M4600</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;New to API's and coding in general.&lt;/P&gt;&lt;P&gt;I am trying to write a script that adds a new firewall rule to a network (I'm using a test site atm).&lt;/P&gt;&lt;P&gt;However I am getting a 404 error which I assume means my URL is wrong?&lt;BR /&gt;&lt;BR /&gt;I got this from the Meraki reference guide but I'm not sure its correct.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;/networks/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;network_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/appliance/firewall/l3firewallRules&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also - I read somewhere that adding a new rule would overwrite all the existing rules! Is that true and if so is there a way to add a rule so that it doesn't effect any existing rules?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;requests&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;security&lt;BR /&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;json&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;api_key = security.MERAKI_API_KEY&lt;BR /&gt;organizationId = security.ORG_ID&lt;BR /&gt;network_id = &lt;SPAN&gt;"xxxxxxxxx"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;rule = {&lt;BR /&gt;    &lt;SPAN&gt;'name'&lt;/SPAN&gt;: &lt;SPAN&gt;'Test Rule'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'policy'&lt;/SPAN&gt;: &lt;SPAN&gt;'deny'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'protocol'&lt;/SPAN&gt;: &lt;SPAN&gt;'any'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'srcPort'&lt;/SPAN&gt;: &lt;SPAN&gt;'any'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'srcCidr'&lt;/SPAN&gt;: &lt;SPAN&gt;'1.1.1.1/24'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'dstPort'&lt;/SPAN&gt;: &lt;SPAN&gt;'any'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'dstCidr'&lt;/SPAN&gt;: &lt;SPAN&gt;'0.0.0.0/0'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;url = &lt;SPAN&gt;f"https://api.meraki.com/api/v1/networks/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;network_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/appliance/firewall/l3firewallRules"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;headers = {&lt;BR /&gt;    &lt;SPAN&gt;'X-Cisco-Meraki-API-Key'&lt;/SPAN&gt;: api_key&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt;: &lt;SPAN&gt;'application/json'&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;response = requests.post(url&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;=headers&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=json.dumps(rule)&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;verify&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(response.status_code)&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 12:17:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427925#M4600</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T12:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427926#M4601</link>
      <description>&lt;P&gt;Here is the correct URL:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api/#!update-network-l-3-firewall-rules" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api/#!update-network-l-3-firewall-rules&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 12:27:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427926#M4601</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T12:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427927#M4602</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply, but Im still getting a 404 error &lt;SPAN class="lia-unicode-emoji" title=":disappointed_face:"&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;am I getting the url wrong or can something else cause this issue?&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;url = &lt;SPAN&gt;f"https://api.meraki.com/api/v1/networks/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;network_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/l3FirewallRules"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;response = requests.post(url&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;=headers&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=json.dumps(rule)&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;verify&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:14:12 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427927#M4602</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427928#M4603</link>
      <description>&lt;P&gt;I think your link may be the out of date version 0&lt;BR /&gt;&lt;BR /&gt;Version 1&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-l-3-firewall-rules" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-firewall-l-3-firewall-rules&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:19:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427928#M4603</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427929#M4604</link>
      <description>&lt;P&gt;404 - Not Found The requested resource doesn't exist or incorrect API key&lt;/P&gt;&lt;P&gt;You can test It on the Meraki developer Hub before.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:21:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427929#M4604</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T13:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427930#M4605</link>
      <description>&lt;P&gt;I would troubleshoot this issue with these steps :&lt;/P&gt;&lt;P&gt;1- Create a dummy rule from the dashboard&lt;/P&gt;&lt;P&gt;2- GET the rule via the API&lt;/P&gt;&lt;P&gt;3- PUT the exact same response received from step #2.&lt;/P&gt;&lt;P&gt;You have to be Org admin / Net admin to do that. &lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:21:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427930#M4605</guid>
      <dc:creator>Raphael_L</dc:creator>
      <dc:date>2023-01-30T13:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427931#M4606</link>
      <description>&lt;P&gt;Use this one:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/api-latest/" target="_blank" rel="noopener nofollow noreferrer"&gt;https://developer.cisco.com/meraki/api-latest/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:22:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427931#M4606</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T13:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427932#M4607</link>
      <description>&lt;P&gt;If I run the exact same script as a GET - it works ok. I can also run the get from the dashboard.&lt;/P&gt;&lt;P&gt;I noticed I was using POST rather than PUT so made that change but if I do that I get a 400 error instead &lt;SPAN class="lia-unicode-emoji" title=":disappointed_face:"&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;url = &lt;SPAN&gt;f"https://api.meraki.com/api/v1/networks/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;network_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/appliance/firewall/l3FirewallRules"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;response = requests.put(url&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;=headers&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=json.dumps(rule)&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;verify&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:30:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427932#M4607</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427933#M4608</link>
      <description>&lt;P&gt;huh - if I try to use the PUT operation from the dashboard - its gets a 404 there too&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adrian4_0-1675085603833.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/262939iFDC00C395609DE24/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:33:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427933#M4608</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427934#M4609</link>
      <description>&lt;P&gt;400 - Bad Request The request was unacceptable, often due to missing a required parameter.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:33:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427934#M4609</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T13:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427935#M4610</link>
      <description>&lt;P&gt;shouldn't the dashboard tell me if there are any required parameters?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:35:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427935#M4610</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427936#M4611</link>
      <description>&lt;P&gt;Have you enabled API access?&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#:~:text=test%20API%20calls.-,Enable%20API%20Access,to%20generate%20an%20API%20key" target="_blank" rel="nofollow noopener noreferrer"&gt;https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#:~:text=test%20API%20calls.-,Enable%20API%20Access,to%20generate%20an%20API%20key&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:36:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427936#M4611</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T13:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427937#M4612</link>
      <description>&lt;P&gt;HTTP400 is sent because the dashboard doesn't like your request. Doesn't mean you are missing a parameter. &lt;/P&gt;&lt;P&gt;Using the Meraki SDK would be easier to troubleshoot. &lt;/P&gt;&lt;P&gt;The issue is within the payload.  &lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=json.dumps(rule)&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:38:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427937#M4612</guid>
      <dc:creator>Raphael_L</dc:creator>
      <dc:date>2023-01-30T13:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427938#M4613</link>
      <description>&lt;P&gt;&lt;A href="https://developer.cisco.com/codeexchange/github/repo/CiscoSE/AddMerakiMXL3FirewallRuleToNetworks#usecase" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/codeexchange/github/repo/CiscoSE/AddMerakiMXL3FirewallRuleToNetworks#usecase&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/meraki/build/mx-firewall-control-python-script/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://developer.cisco.com/meraki/build/mx-firewall-control-python-script/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:39:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427938#M4613</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T13:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427939#M4614</link>
      <description>&lt;P&gt;Not pretty , but should work. &lt;/P&gt;&lt;PRE class="lia-code-sample language-python"&gt;&lt;CODE&gt;import os
import json
import requests
import codecs

base_url_v1 = 'https://api.meraki.com/api/v1'
NetworkID = XXXXXXXXXXX
headers = {
	'x-cisco-meraki-api-key': format(str(apikey)),
	'Content-Type': 'application/json'
}
def __returnhandler(statuscode, returntext):
    if str(statuscode) == '200':
        return returntext
    else:
        print('HTTP Status Code: {0}\n'.format(statuscode))
def getL3FirewallRules():
    geturl = '{0}/networks/{1}/appliance/firewall/l3FirewallRules'.format(str(base_url_v1), str(NetworkID))
    dashboard = requests.get(geturl, headers=headers,verify=False)
    result = __returnhandler(dashboard.status_code, dashboard.text)
    return result 

L3FWRules = getL3FirewallRules()

payload = L3FWRules
url = 'https://api.meraki.com/api/v1/networks/{0}/appliance/firewall/l3FirewallRules'.format(NetworkID)
response = requests.request('PUT', url, headers=headers, data = payload,verify=False)
print(response.text.encode('utf8'))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:41:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427939#M4614</guid>
      <dc:creator>Raphael_L</dc:creator>
      <dc:date>2023-01-30T13:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427940#M4615</link>
      <description>&lt;P&gt;Yes, as mentioned, moments before i tried the PUT I did a successful GET&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:43:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427940#M4615</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427941#M4616</link>
      <description>&lt;P&gt;Thanks you!&lt;BR /&gt;&lt;BR /&gt;This put me on the right track. I changed &lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=json.dumps(rule)&lt;/PRE&gt;&lt;P&gt;to &lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;data&lt;/SPAN&gt;=rule&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;and then changed the rule paramater to this&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;rule = &lt;SPAN&gt;'''{&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    "rules": [&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        {&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "comment": "Test Rule.",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "policy": "allow",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "protocol": "tcp",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "destPort": "443",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "destCidr": "192.168.1.0/24",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "srcPort": "Any",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "srcCidr": "Any",&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;            "syslogEnabled": false&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;        }&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    ]&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;}'''&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;(slight syntax change)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;just my second issue now - this seems to overwrite all the existing rules rather than just add this to the list.&lt;BR /&gt;&lt;BR /&gt;how do I add things without deleting all the others?&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:51:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427941#M4616</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427942#M4617</link>
      <description>&lt;P&gt;You can't update, you have to set all rules again when you create a new rule.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:52:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427942#M4617</guid>
      <dc:creator>aleabrahao</dc:creator>
      <dc:date>2023-01-30T13:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427943#M4618</link>
      <description>&lt;P&gt;You can't append a rule. You have to push the whole rule base.&lt;/P&gt;&lt;P&gt;So I would suggest doing a GET first , append your modifications , then PUT the whole rule base.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:52:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427943#M4618</guid>
      <dc:creator>Raphael_L</dc:creator>
      <dc:date>2023-01-30T13:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: correct endpoint for firewall rules?</title>
      <link>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427944#M4619</link>
      <description>&lt;P&gt;am I going to have to call the existing rules, then add them along with the new rule to the update call and basically re-write all the rules each time?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 13:53:58 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/correct-endpoint-for-firewall-rules/m-p/5427944#M4619</guid>
      <dc:creator>Adrian41</dc:creator>
      <dc:date>2023-01-30T13:53:58Z</dc:date>
    </item>
  </channel>
</rss>

