<?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 XML API - Need to replace services for a security rule via XML api - currently api call is appending new port in Integration Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/integration-discussions/xml-api-need-to-replace-services-for-a-security-rule-via-xml-api/m-p/411532#M69</link>
    <description>&lt;P&gt;Hi - I create a service (tcp-443) and then create a security rule that uses this service as the service member.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, if I call the same API call with the same xpath and provide a different service, say tcp-449, the resulting security rule has *both* tcp-443 and tcp-449 in the Service column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First call is &amp;lt;service&amp;gt;["tcp-443"]&amp;lt;/service&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second call is &amp;lt;service&amp;gt;["tcp-449"]&amp;lt;/service&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;xpath&lt;/SPAN&gt;: &lt;SPAN&gt;`/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='&lt;/SPAN&gt;${ deviceGroup }&lt;SPAN&gt;']/&lt;/SPAN&gt;${ rulebase }&lt;SPAN&gt;/security/rules/entry[@name='&lt;/SPAN&gt;${ entryName }&lt;SPAN&gt;']`&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I would like the second call to replace "tcp-443" with "tcp-449" - what it is doing is appending "tcp-449" to the services. Can I do that without deleting the security rule and re-adding it?&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 14:20:58 GMT</pubDate>
    <dc:creator>MikeBaranski</dc:creator>
    <dc:date>2021-06-07T14:20:58Z</dc:date>
    <item>
      <title>XML API - Need to replace services for a security rule via XML api - currently api call is appending new port</title>
      <link>https://live.paloaltonetworks.com/t5/integration-discussions/xml-api-need-to-replace-services-for-a-security-rule-via-xml-api/m-p/411532#M69</link>
      <description>&lt;P&gt;Hi - I create a service (tcp-443) and then create a security rule that uses this service as the service member.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, if I call the same API call with the same xpath and provide a different service, say tcp-449, the resulting security rule has *both* tcp-443 and tcp-449 in the Service column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First call is &amp;lt;service&amp;gt;["tcp-443"]&amp;lt;/service&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second call is &amp;lt;service&amp;gt;["tcp-449"]&amp;lt;/service&amp;gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;xpath&lt;/SPAN&gt;: &lt;SPAN&gt;`/config/devices/entry[@name='localhost.localdomain']/device-group/entry[@name='&lt;/SPAN&gt;${ deviceGroup }&lt;SPAN&gt;']/&lt;/SPAN&gt;${ rulebase }&lt;SPAN&gt;/security/rules/entry[@name='&lt;/SPAN&gt;${ entryName }&lt;SPAN&gt;']`&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I would like the second call to replace "tcp-443" with "tcp-449" - what it is doing is appending "tcp-449" to the services. Can I do that without deleting the security rule and re-adding it?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 14:20:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/integration-discussions/xml-api-need-to-replace-services-for-a-security-rule-via-xml-api/m-p/411532#M69</guid>
      <dc:creator>MikeBaranski</dc:creator>
      <dc:date>2021-06-07T14:20:58Z</dc:date>
    </item>
  </channel>
</rss>

