<?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: Changing Metric of Static Route using API in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332158#M2378</link>
    <description>&lt;P&gt;Absoluletly perfect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou very much!&lt;/P&gt;</description>
    <pubDate>Sun, 07 Jun 2020 09:25:52 GMT</pubDate>
    <dc:creator>Kris.Pamphilon</dc:creator>
    <dc:date>2020-06-07T09:25:52Z</dc:date>
    <item>
      <title>Changing Metric of Static Route using API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332107#M2376</link>
      <description>&lt;P&gt;All, trying to send a command via the API to change the metric value of a static route, this is because occassionally my primary connection is extremely slow, but doesnt fail so path monitoring doesnt remove the primary static route. I'd like to be able to integrate this into some other home automation I have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like I'm close, but cant seem to get the correct syntax from debug CLI ouput, I've done it with SET commands easily enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The below returns an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="pretty-print"&gt;&lt;DIV class="folder"&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;response&lt;SPAN class="html-attribute"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="html-attribute-name"&gt;status&lt;/SPAN&gt;="&lt;SPAN class="html-attribute-value"&gt;error&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class="html-attribute"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="html-attribute-name"&gt;code&lt;/SPAN&gt;="&lt;SPAN class="html-attribute-value"&gt;13&lt;/SPAN&gt;"&lt;/SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="opened"&gt;&lt;DIV class="folder"&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;msg&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="opened"&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;line&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;set failed, may need to override template object first&lt;/SPAN&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;/line&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;/msg&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&lt;SPAN class="html-tag"&gt;&amp;lt;/response&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="line"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;U&gt;My not working command:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;https://FIREWALL/api?key=APIKEY&amp;amp;type=config&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/network/virtual-router/entry[@name='default']/routing-table/ip/static-route/entry[@name='Backup Default Route']/metric&amp;amp;element=&amp;lt;'entry name='200''/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;My Debug CLI output after successful SET command:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;request cmd="set" obj="/config/devices/entry[@name='localhost.localdomain']/network/virtual-router/entry[@name='default']/routing-table/ip/static-route/entry[@name='Backup Default Route']" cookie="7921424603090921"&amp;gt;&amp;lt;metric&amp;gt;200&amp;lt;/metric&amp;gt;&amp;lt;/request&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a bonus, the commit command for the API would also be nice &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 22:34:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332107#M2376</guid>
      <dc:creator>Kris.Pamphilon</dc:creator>
      <dc:date>2020-06-06T22:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Metric of Static Route using API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332116#M2377</link>
      <description>&lt;P&gt;Hello &lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/93128"&gt;@Kris.Pamphilon&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try it with ...[@name='Backup Default Route']&amp;amp;element=&amp;lt;metric&amp;gt;200&amp;lt;/metric&amp;gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 22:57:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332116#M2377</guid>
      <dc:creator>JoergSchuetter</dc:creator>
      <dc:date>2020-06-06T22:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Metric of Static Route using API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332158#M2378</link>
      <description>&lt;P&gt;Absoluletly perfect!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou very much!&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 09:25:52 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/changing-metric-of-static-route-using-api/m-p/332158#M2378</guid>
      <dc:creator>Kris.Pamphilon</dc:creator>
      <dc:date>2020-06-07T09:25:52Z</dc:date>
    </item>
  </channel>
</rss>

