<?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: Create Profile Rule - Cisco DNAC API in Software-Defined Access (SD-Access)</title>
    <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633911#M1920</link>
    <description>&lt;P&gt;Glad it's not just me.&amp;nbsp; and yeah i tried to reserve one of their online labs but said it would take 2 months :).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 18:20:30 GMT</pubDate>
    <dc:creator>ryanmbess</dc:creator>
    <dc:date>2022-06-17T18:20:30Z</dc:date>
    <item>
      <title>Create Profile Rule - Cisco DNAC API</title>
      <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633374#M1914</link>
      <description>&lt;P&gt;Can someone provide me some sample code in python to create a simple Profile Rule within DNAC via the api.&amp;nbsp; I'm following this and it's not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.cisco.com/docs/dna-center/#!create-a-profiling-rule" target="_blank" rel="noopener"&gt;https://developer.cisco.com/docs/dna-center/#!create-a-profiling-rule&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 18:03:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633374#M1914</guid>
      <dc:creator>ryanmbess</dc:creator>
      <dc:date>2022-06-16T18:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Profile Rule - Cisco DNAC API</title>
      <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633467#M1915</link>
      <description>&lt;P&gt;Good News, it is right on the link you sent on the right side of the screen. Did you already try and you are getting errors? If so, can you share?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another tip is to perform a GET of existing content to help you understand the formatting.&lt;/P&gt;
&lt;DIV id="tinyMceEditor_d11a9ff4170451ModernCyber_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditor_d11a9ff4170451ModernCyber_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="PythonDevNet.jpg" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/153978iBA480954EEFB21F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="PythonDevNet.jpg" alt="PythonDevNet.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;import requests&lt;/P&gt;
&lt;P&gt;url = "https:///dna/intent/api/v1/endpoint-analytics/profiling-rules"&lt;/P&gt;
&lt;P&gt;payload = '''{&lt;BR /&gt;"ruleId": null,&lt;BR /&gt;"ruleName": null,&lt;BR /&gt;"ruleType": "Cisco Default - Static",&lt;BR /&gt;"ruleVersion": null,&lt;BR /&gt;"rulePriority": null,&lt;BR /&gt;"sourcePriority": null,&lt;BR /&gt;"isDeleted": null,&lt;BR /&gt;"lastModifiedBy": null,&lt;BR /&gt;"lastModifiedOn": null,&lt;BR /&gt;"pluginId": null,&lt;BR /&gt;"clusterId": null,&lt;BR /&gt;"rejected": null,&lt;BR /&gt;"result": {&lt;BR /&gt;"deviceType": [ null ],&lt;BR /&gt;"hardwareManufacturer": [ null ],&lt;BR /&gt;"hardwareModel": [ null ],&lt;BR /&gt;"operatingSystem": [ null ]&lt;BR /&gt;},&lt;BR /&gt;"conditionGroups": {&lt;BR /&gt;"type": "attr",&lt;BR /&gt;"condition": {&lt;BR /&gt;"attribute": null,&lt;BR /&gt;"operator": "equals",&lt;BR /&gt;"value": null,&lt;BR /&gt;"attributeDictionary": null&lt;BR /&gt;},&lt;BR /&gt;"operator": "and",&lt;BR /&gt;"conditionGroup": [ null ]&lt;BR /&gt;},&lt;BR /&gt;"usedAttributes": [ null ]&lt;BR /&gt;}'''&lt;/P&gt;
&lt;P&gt;headers = {&lt;BR /&gt;"Content-Type": "application/json",&lt;BR /&gt;"Accept": "application/json"&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;response = requests.request('POST', url, headers=headers, data = payload)&lt;/P&gt;
&lt;P&gt;print(response.text.encode('utf8'))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 20:45:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633467#M1915</guid>
      <dc:creator>ModernCyber</dc:creator>
      <dc:date>2022-06-16T20:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create Profile Rule - Cisco DNAC API</title>
      <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633497#M1916</link>
      <description>&lt;P&gt;Hey ModernCyber,&lt;/P&gt;&lt;P&gt;Yeah saw that....however i get a 500 back from DNAC.&amp;nbsp; Below is what i'm running&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;requests&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;url&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://ipofdnacenter/dna/intent/api/v1/endpoint-analytics/profiling-rules" target="_blank"&gt;https://ipofdnacenter/dna/intent/api/v1/endpoint-analytics/profiling-rules&lt;/A&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;payload&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'''{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"ruleId": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"ruleName": Rule123,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"ruleType": "Cisco Default - Static",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"ruleVersion": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"rulePriority": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"sourcePriority": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"isDeleted": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"lastModifiedBy": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"lastModifiedOn": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"pluginId": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"clusterId": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"rejected": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"result": {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"deviceType": [ null ],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"hardwareManufacturer": [ null ],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"hardwareModel": [ null ],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"operatingSystem": [ null ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"conditionGroups": {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"type": "attr",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"condition": {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"attribute": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"operator": "equals",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"value": null,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"attributeDictionary": null&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"operator": "and",&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"conditionGroup": [ null ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"usedAttributes": [ null ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}'''&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;headers&lt;/SPA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AN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;payload&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;text&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;encode&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'utf8'&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This results in the below.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;C:\Program Files\Python310\lib\site-packages\urllib3\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host 'x.x.x.x. Adding certificate verification is strongly advised. See: &lt;A href="https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings" target="_blank"&gt;https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings&lt;/A&gt;&lt;BR /&gt;warnings.warn(&lt;BR /&gt;b'Http Error Code:500'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thoughts?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jun 2022 21:50:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633497#M1916</guid>
      <dc:creator>ryanmbess</dc:creator>
      <dc:date>2022-06-16T21:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create Profile Rule - Cisco DNAC API</title>
      <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633755#M1918</link>
      <description>&lt;P&gt;I think see the issue.&amp;nbsp; If you log into our DNAC we're running 2.2.3.4.&amp;nbsp; In the developer toolkit site within DNAC there is a Policy section that has the "create a profiling rule".&amp;nbsp; However if you look at the link i provided first, and then pivot into the 2.2.3 api section, you'll see there's NO POLICY section.&amp;nbsp; I think you have to be running 2.3.3 to have this ability.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 12:16:11 GMT</pubDate>
      <guid>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633755#M1918</guid>
      <dc:creator>ryanmbess</dc:creator>
      <dc:date>2022-06-17T12:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create Profile Rule - Cisco DNAC API</title>
      <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633909#M1919</link>
      <description>&lt;P&gt;For this post I doubt if we can do it from Document site.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest to reserve a DNAC sandbox to try or try it from your DNAC.&lt;/P&gt;
&lt;P&gt;I tried from my DNAC I got 500 error too. I suspect there is a dependency there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to do it from GUI (see link below from DNAC user guide) but found out that I don't have any endpoint.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center/2-3-3/user_guide/b_cisco_dna_center_ug_2_3_3/endpoint-analytics-1-0.html#Cisco_Task.dita_edd8d160-ead3-411e-8bdd-4a5a6ff0eb49" target="_blank"&gt;https://www.cisco.com/c/en/us/td/docs/cloud-systems-management/network-automation-and-management/dna-center/2-3-3/user_guide/b_cisco_dna_center_ug_2_3_3/endpoint-analytics-1-0.html#Cisco_Task.dita_edd8d160-ead3-411e-8bdd-4a5a6ff0eb49&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 18:16:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633909#M1919</guid>
      <dc:creator>yawming</dc:creator>
      <dc:date>2022-06-17T18:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create Profile Rule - Cisco DNAC API</title>
      <link>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633911#M1920</link>
      <description>&lt;P&gt;Glad it's not just me.&amp;nbsp; and yeah i tried to reserve one of their online labs but said it would take 2 months :).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 18:20:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/software-defined-access-sd-access/create-profile-rule-cisco-dnac-api/m-p/4633911#M1920</guid>
      <dc:creator>ryanmbess</dc:creator>
      <dc:date>2022-06-17T18:20:30Z</dc:date>
    </item>
  </channel>
</rss>

