<?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: ISE Open API Example with Python in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/ise-open-api-example-with-python/m-p/4722778#M578300</link>
    <description>&lt;P&gt;This is a simple typo problem:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;url = 'https://' + host + '/api/v1/policy/network-admin/policy-set'  # 404 
url = 'https://' + host + '/api/v1/policy/network-access/policy-set' # 200 8-)&lt;/LI-CODE&gt;
&lt;P&gt;See ▶ &lt;A class="" title="https://youtu.be/iauFLdiUPQk" href="https://youtu.be/iauFLdiUPQk" data-from-md="" target="_blank"&gt;ISE REST APIs Introduction&lt;/A&gt; @ &lt;A class="" title="https://youtu.be/iauFLdiUPQk&amp;amp;t=407s" href="https://youtu.be/iauFLdiUPQk&amp;amp;t=407s" data-from-md="" target="_blank"&gt;06:47&lt;/A&gt; for HTTP Response Status Codes and their meanings for clues:&lt;BR /&gt;&lt;A title="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" data-from-md="" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Status&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Nov 2022 22:26:02 GMT</pubDate>
    <dc:creator>thomas</dc:creator>
    <dc:date>2022-11-16T22:26:02Z</dc:date>
    <item>
      <title>ISE Open API Example with Python</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-open-api-example-with-python/m-p/4722084#M578286</link>
      <description>&lt;P&gt;I'm looking for a simple example of a GET in Python for the new Open API&amp;nbsp; (similar to those available with the ERS API).&lt;/P&gt;&lt;P&gt;Example: I can paste the following into a browser, and it works just fine:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;https://&amp;lt;ISE_SERVER&amp;gt;/api/v1/policy/network-access/policy-set&lt;/LI-CODE&gt;&lt;P&gt;I can also get this same request to work via Postman, with Basic Authentication.&lt;/P&gt;&lt;P&gt;When I attempt to do this via Python, I typically get a 404 error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from requests.auth import HTTPBasicAuth
import urllib3
urllib3.disable_warnings()
basic = HTTPBasicAuth(user,passwd)
url = 'https://' + host + '/api/v1/policy/network-admin/policy-set'
headers = {'content-type': 'application/json'}
fred = requests.get(url, auth=basic, headers=headers, verify=False)
print(fred)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 22:30:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-open-api-example-with-python/m-p/4722084#M578286</guid>
      <dc:creator>fitzie</dc:creator>
      <dc:date>2022-11-15T22:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: ISE Open API Example with Python</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-open-api-example-with-python/m-p/4722778#M578300</link>
      <description>&lt;P&gt;This is a simple typo problem:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;url = 'https://' + host + '/api/v1/policy/network-admin/policy-set'  # 404 
url = 'https://' + host + '/api/v1/policy/network-access/policy-set' # 200 8-)&lt;/LI-CODE&gt;
&lt;P&gt;See ▶ &lt;A class="" title="https://youtu.be/iauFLdiUPQk" href="https://youtu.be/iauFLdiUPQk" data-from-md="" target="_blank"&gt;ISE REST APIs Introduction&lt;/A&gt; @ &lt;A class="" title="https://youtu.be/iauFLdiUPQk&amp;amp;t=407s" href="https://youtu.be/iauFLdiUPQk&amp;amp;t=407s" data-from-md="" target="_blank"&gt;06:47&lt;/A&gt; for HTTP Response Status Codes and their meanings for clues:&lt;BR /&gt;&lt;A title="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status" data-from-md="" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Status&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 22:26:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-open-api-example-with-python/m-p/4722778#M578300</guid>
      <dc:creator>thomas</dc:creator>
      <dc:date>2022-11-16T22:26:02Z</dc:date>
    </item>
  </channel>
</rss>

