<?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: I send a request using &amp;quot;set&amp;quot; action but in the logs is an &amp;quot;edit&amp;quot; action and it replaces the configuration in Automation/API Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389910#M2571</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/162062"&gt;@NotisKontothanasis&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;That's because this is what you're telling the device to do. You're having it replace everything under &amp;lt;users&amp;gt; which is not what you want. You need to modify the request slightly so that the element you are modifying is the entry you are trying to create instead of the entirety of &amp;lt;users/&amp;gt;.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://MYFIREWALL/api?type=config&amp;amp;action=set&amp;amp;key=MYKEY&amp;amp;xpath=/config/mgt-config/users&amp;amp;element=&amp;lt;entry name="MYUSER"&amp;gt;&amp;lt;permissions&amp;gt;&amp;lt;role-based&amp;gt;&amp;lt;superuser&amp;gt;yes&amp;lt;/superuser&amp;gt;&amp;lt;/role-based&amp;gt;&amp;lt;/permissions&amp;gt;&amp;lt;phash&amp;gt;MYPHASH&amp;lt;/phash&amp;gt;&amp;lt;/entry&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Mar 2021 02:59:37 GMT</pubDate>
    <dc:creator>BPry</dc:creator>
    <dc:date>2021-03-09T02:59:37Z</dc:date>
    <item>
      <title>I send a request using "set" action but in the logs is an "edit" action and it replaces the configuration</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389666#M2570</link>
      <description>&lt;P data-unlink="true"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I try to add new administrators using the XML API. I send a "set" action in order to add a new admin. However it replaces the configuration and just add the new admin.&amp;nbsp; I have tried POST and PUT methods.&amp;nbsp;&lt;BR /&gt;The call is:&lt;BR /&gt;&lt;BR /&gt;https://XXXXXX/api?type=config&amp;amp;action=set&amp;amp;key=XXXX&amp;amp;xpath=/config/mgt-config/users&amp;amp;element=&amp;nbsp;&lt;SPAN&gt;&amp;lt;users&amp;gt;&amp;lt;entry name="XXXXXX"&amp;gt;&amp;lt;permissions&amp;gt;&amp;lt;role-based&amp;gt;&amp;lt;superuser&amp;gt;yes&amp;lt;/superuser&amp;gt;&amp;lt;/role-based&amp;gt;&amp;lt;/permissions&amp;gt;&amp;lt;authentication-profile&amp;gt;XXXXX&amp;lt;/authentication-profile&amp;gt;&amp;lt;/entry&amp;gt;&amp;lt;/users&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Any suggestions or comments? I have opened a case with Palo Alto support as well&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 07:33:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389666#M2570</guid>
      <dc:creator>NotisKontothanasis</dc:creator>
      <dc:date>2021-03-08T07:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: I send a request using "set" action but in the logs is an "edit" action and it replaces the configuration</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389910#M2571</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/162062"&gt;@NotisKontothanasis&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;That's because this is what you're telling the device to do. You're having it replace everything under &amp;lt;users&amp;gt; which is not what you want. You need to modify the request slightly so that the element you are modifying is the entry you are trying to create instead of the entirety of &amp;lt;users/&amp;gt;.&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://MYFIREWALL/api?type=config&amp;amp;action=set&amp;amp;key=MYKEY&amp;amp;xpath=/config/mgt-config/users&amp;amp;element=&amp;lt;entry name="MYUSER"&amp;gt;&amp;lt;permissions&amp;gt;&amp;lt;role-based&amp;gt;&amp;lt;superuser&amp;gt;yes&amp;lt;/superuser&amp;gt;&amp;lt;/role-based&amp;gt;&amp;lt;/permissions&amp;gt;&amp;lt;phash&amp;gt;MYPHASH&amp;lt;/phash&amp;gt;&amp;lt;/entry&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 02:59:37 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389910#M2571</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2021-03-09T02:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: I send a request using "set" action but in the logs is an "edit" action and it replaces the configuration</title>
      <link>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389932#M2572</link>
      <description>&lt;P&gt;Thanks a lot!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 06:54:56 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/automation-api-discussions/i-send-a-request-using-quot-set-quot-action-but-in-the-logs-is/m-p/389932#M2572</guid>
      <dc:creator>NotisKontothanasis</dc:creator>
      <dc:date>2021-03-09T06:54:56Z</dc:date>
    </item>
  </channel>
</rss>

