<?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: PYTHON API REST CODE FOR DELETE MAC ADD ENDPOINT FROM ISE 2.7 DB in Endpoint Security</title>
    <link>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4531730#M6597</link>
    <description>&lt;P data-unlink="true"&gt;Yes this is possible using an API.&amp;nbsp; Take a look at the online sdk (https://your ise pan ip:9060/ers/sdk#) - specifically Endpoint Delete&lt;/P&gt;
&lt;P data-unlink="true"&gt;The trick here will be the fact that you will need to first query to get the endpoint ID string, to then use the ID string in the delete request.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;This snippet of python should shed some light on how to extract the endpoint ID string first:&lt;/P&gt;
&lt;PRE data-unlink="true"&gt;r = p_APIold(HW_ADDR)&lt;BR /&gt;print r.encoding&lt;BR /&gt;&lt;BR /&gt;data = r.text&lt;BR /&gt;#Store response unicode file contents as string so we can extract unique ID&lt;BR /&gt;hostIDJSON = json.loads(data)&lt;BR /&gt;for client in hostIDJSON['SearchResult']['resources']:&lt;BR /&gt;    temp = client['id']&lt;BR /&gt;    print temp&lt;BR /&gt;    p_APIupdate(temp)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Good luck &amp;amp; HTH!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Jan 2022 18:15:13 GMT</pubDate>
    <dc:creator>Mike.Cifelli</dc:creator>
    <dc:date>2022-01-14T18:15:13Z</dc:date>
    <item>
      <title>PYTHON API REST CODE FOR DELETE MAC ADD ENDPOINT FROM ISE 2.7 DB</title>
      <link>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4522108#M6560</link>
      <description>&lt;P&gt;Hello, sorry for my english. I writed a python api post code for add a mac add to endpoint group (whitelist), but now need another python api rest code for delete a mac add form DB ise directly.. (not from whitelist)..&lt;/P&gt;&lt;P&gt;The new code need question it the mac add y only eliminate from DB code. Is possible?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Dec 2021 12:34:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4522108#M6560</guid>
      <dc:creator>cbarredo1972</dc:creator>
      <dc:date>2021-12-21T12:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON API REST CODE FOR DELETE MAC ADD ENDPOINT FROM ISE 2.7 DB</title>
      <link>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4531730#M6597</link>
      <description>&lt;P data-unlink="true"&gt;Yes this is possible using an API.&amp;nbsp; Take a look at the online sdk (https://your ise pan ip:9060/ers/sdk#) - specifically Endpoint Delete&lt;/P&gt;
&lt;P data-unlink="true"&gt;The trick here will be the fact that you will need to first query to get the endpoint ID string, to then use the ID string in the delete request.&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;This snippet of python should shed some light on how to extract the endpoint ID string first:&lt;/P&gt;
&lt;PRE data-unlink="true"&gt;r = p_APIold(HW_ADDR)&lt;BR /&gt;print r.encoding&lt;BR /&gt;&lt;BR /&gt;data = r.text&lt;BR /&gt;#Store response unicode file contents as string so we can extract unique ID&lt;BR /&gt;hostIDJSON = json.loads(data)&lt;BR /&gt;for client in hostIDJSON['SearchResult']['resources']:&lt;BR /&gt;    temp = client['id']&lt;BR /&gt;    print temp&lt;BR /&gt;    p_APIupdate(temp)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Good luck &amp;amp; HTH!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 18:15:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4531730#M6597</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2022-01-14T18:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: PYTHON API REST CODE FOR DELETE MAC ADD ENDPOINT FROM ISE 2.7 DB</title>
      <link>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4531757#M6598</link>
      <description>&lt;P&gt;THX very much!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 19:02:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/python-api-rest-code-for-delete-mac-add-endpoint-from-ise-2-7-db/m-p/4531757#M6598</guid>
      <dc:creator>cbarredo1972</dc:creator>
      <dc:date>2022-01-14T19:02:08Z</dc:date>
    </item>
  </channel>
</rss>

