<?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 How to Configure the Management Interface IP via API in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/97828#M1251</link>
    <description>&lt;P&gt;Trying to automate a task of configuring the management interface of a firewall device through the API.&amp;nbsp; I see where the API's leading for the configuration, but I'm stumped as to how to edit/set the IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example. using Powershell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Firewall = https://firewall&lt;/P&gt;&lt;P&gt;$apiKey = apikey&lt;/P&gt;&lt;P&gt;$ipaddress = x.x.x.x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$content1 = Invoke-RestMethod "$Firewall/api/?type=config&amp;amp;key=$apiKey&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/ip-address/member[@name='$ipaddress']"&lt;/PRE&gt;&lt;P&gt;How would I proceed with setting the $ipaddress I need to the location?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 21:03:46 GMT</pubDate>
    <dc:creator>SA129</dc:creator>
    <dc:date>2016-07-14T21:03:46Z</dc:date>
    <item>
      <title>How to Configure the Management Interface IP via API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/97828#M1251</link>
      <description>&lt;P&gt;Trying to automate a task of configuring the management interface of a firewall device through the API.&amp;nbsp; I see where the API's leading for the configuration, but I'm stumped as to how to edit/set the IP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example. using Powershell:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$Firewall = https://firewall&lt;/P&gt;&lt;P&gt;$apiKey = apikey&lt;/P&gt;&lt;P&gt;$ipaddress = x.x.x.x&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$content1 = Invoke-RestMethod "$Firewall/api/?type=config&amp;amp;key=$apiKey&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/ip-address/member[@name='$ipaddress']"&lt;/PRE&gt;&lt;P&gt;How would I proceed with setting the $ipaddress I need to the location?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 21:03:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/97828#M1251</guid>
      <dc:creator>SA129</dc:creator>
      <dc:date>2016-07-14T21:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Configure the Management Interface IP via API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/97955#M1252</link>
      <description>&lt;P&gt;I think you need to include the "element=" for the value you want to set:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example somehting like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$content1 = Invoke-RestMethod "$Firewall/api/?type=config&amp;amp;key=$apiKey&amp;amp;action=set&amp;amp;xpath=/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/&amp;amp;element=&amp;lt;ip-address&amp;gt;$ipaddress&amp;lt;/ip-address&amp;gt;"&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Jul 2016 06:32:01 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/97955#M1252</guid>
      <dc:creator>torm</dc:creator>
      <dc:date>2016-07-15T06:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Configure the Management Interface IP via API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/98043#M1253</link>
      <description>&lt;P&gt;I've played around with the element approach from both /deviceconfig/system and /deviceconfig/system/ipaddress.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately, I'm not having any luck on it.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 13:15:54 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/98043#M1253</guid>
      <dc:creator>SA129</dc:creator>
      <dc:date>2016-07-15T13:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Configure the Management Interface IP via API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/98264#M1254</link>
      <description>&lt;P&gt;The XPath cannot end in slash. &amp;nbsp;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ ./panxapi.py -t p30443 -xS '&amp;lt;ip-address&amp;gt;192.168.1.102&amp;lt;/ip-address&amp;gt;' "/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system/"&lt;BR /&gt;set: error [code="13"]: "set failed, may need to override template object first"&lt;BR /&gt;&amp;lt;response code="13" status="error"&amp;gt;&amp;lt;msg&amp;gt;&amp;lt;line&amp;gt;set failed, may need to override template object first&amp;lt;/line&amp;gt;&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;BR /&gt;&lt;BR /&gt;$ ./panxapi.py -t p30443 -xS '&amp;lt;ip-address&amp;gt;192.168.1.102&amp;lt;/ip-address&amp;gt;' "/config/devices/entry[@name='localhost.localdomain']/deviceconfig/system"&lt;BR /&gt;set: success [code="20"]: "command succeeded"&lt;BR /&gt;&amp;lt;response code="20" status="success"&amp;gt;&amp;lt;msg&amp;gt;command succeeded&amp;lt;/msg&amp;gt;&amp;lt;/response&amp;gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2016 00:16:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/98264#M1254</guid>
      <dc:creator>ksteves1</dc:creator>
      <dc:date>2016-07-18T00:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Configure the Management Interface IP via API</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/98912#M1255</link>
      <description>&lt;P&gt;That was it.&amp;nbsp; Thanks ksteves1&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 20:14:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/how-to-configure-the-management-interface-ip-via-api/m-p/98912#M1255</guid>
      <dc:creator>SA129</dc:creator>
      <dc:date>2016-07-20T20:14:04Z</dc:date>
    </item>
  </channel>
</rss>

