<?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 v3.2 patch 5 - API Network Device Group Creation in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5207350#M592396</link>
    <description>&lt;P&gt;You mispelled as ngd not ndg in your example above. &lt;FONT face="courier new,courier"&gt;ndgtype&lt;/FONT&gt; was a bug introduced for a while and should be fixed in all releases with latest patches. The correct attribute name to use is &lt;FONT face="courier new,courier"&gt;othername&lt;/FONT&gt; instead of &lt;FONT face="courier new,courier"&gt;ndgtype&lt;/FONT&gt; .&lt;/P&gt;
&lt;P&gt;This worked for me on ISE 3.3 Patch 2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl  --include  --insecure  --location \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --user $ISE_REST_USERNAME:$ISE_REST_PASSWORD  \
  --request POST https://$ISE_PPAN/ers/config/networkdevicegroup \
  --data '
{
  "NetworkDeviceGroup": {
    "name": "Location#All Locations#AA",
    "description": "...",
    "othername": "Location"
  }
}'

HTTP/1.1 201
Location: https://ise/ers/config/networkdevicegroup/718aad00-87ec-11ef-9c62-6ecbd13ff78e
Date: Fri, 11 Oct 2024 16:18:26 GMT&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2024 16:24:08 GMT</pubDate>
    <dc:creator>thomas</dc:creator>
    <dc:date>2024-10-11T16:24:08Z</dc:date>
    <item>
      <title>ISE v3.2 patch 5 - API Network Device Group Creation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5206585#M592361</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We try to add network device groups to all Location with python&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;headers = {'content-type' : 'application/json', 'Accept':'application/jsson'}&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;payload="&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"NetworkDeviceGroup" : {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"name" : "Location&lt;/SPAN&gt;&lt;SPAN&gt;#All Locations#AA",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"ngdtype" : "Location&lt;/SPAN&gt;&lt;SPAN&gt;",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"description" : "Imported"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;rest_url = &lt;A href="https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevicegroup" target="_blank" rel="noopener"&gt;https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevicegroup&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;requests.post(url=rest_url, auth=(ise_user, ise_password), headers=headers, verify=False, data = payload)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We always get the 400 Bad request error.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thanks for helping.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 14:28:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5206585#M592361</guid>
      <dc:creator>GtheGreat</dc:creator>
      <dc:date>2024-10-10T14:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: ISE v3.2 patch 5 - API Network Device Group Creation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5207016#M592391</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working together with GtheGreat at this issue. I just would like to correct the API-Call and specify more details:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=&amp;gt; &lt;STRONG&gt;we are using ISE v3.2 with patch-level 5, ERS and Python:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; headers = {'Content-Type' : 'application/json', 'Accept':'application/&lt;STRONG&gt;json&lt;/STRONG&gt;'}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; payload = {"NetworkDeviceGroup" : {"&lt;STRONG&gt;name&lt;/STRONG&gt;" : "&lt;STRONG&gt;Location#All Locations#AA&lt;/STRONG&gt;",&lt;/EM&gt;&lt;EM&gt; "description" : "Imported", "&lt;STRONG&gt;ndgtype&lt;/STRONG&gt;" : "Location"}}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; rest_url = &lt;STRONG&gt;'&lt;A href="https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevicegroup" target="_blank" rel="noopener"&gt;https://xxx.xxx.xxx.xxx:9060/ers/config/networkdevicegroup'&lt;/A&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; requests.post (url=rest_url, auth=(ise_user, ise_password), headers=headers, verify=&lt;STRONG&gt;False&lt;/STRONG&gt;, data=payload)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway we receive always the same http-error&amp;nbsp; "&lt;STRONG&gt;&lt;EM&gt;&lt;FONT color="#FF0000"&gt;400 - Bad request&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;&lt;/STRONG&gt;". The problem is probably in the field called "&lt;STRONG&gt;&lt;EM&gt;name&lt;/EM&gt;&lt;/STRONG&gt;":&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;"&lt;STRONG&gt;Location#All Locations#AA&lt;/STRONG&gt;"&lt;/EM&gt; doesn't work&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;"&lt;STRONG&gt;Location:All Locations:AA&lt;/STRONG&gt;"&lt;/EM&gt; doesn't work&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;"&lt;STRONG&gt;All Locations#AA&lt;/STRONG&gt;"&lt;/EM&gt; doesn't work&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;"&lt;STRONG&gt;All Locations:AA&lt;/STRONG&gt;"&lt;/EM&gt; doesn't work&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;"&lt;STRONG&gt;AA&lt;/STRONG&gt;"&lt;/EM&gt;&lt;SPAN&gt; doesn't work&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for any help and suggestions!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 08:12:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5207016#M592391</guid>
      <dc:creator>andrea80</dc:creator>
      <dc:date>2024-10-11T08:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: ISE v3.2 patch 5 - API Network Device Group Creation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5207350#M592396</link>
      <description>&lt;P&gt;You mispelled as ngd not ndg in your example above. &lt;FONT face="courier new,courier"&gt;ndgtype&lt;/FONT&gt; was a bug introduced for a while and should be fixed in all releases with latest patches. The correct attribute name to use is &lt;FONT face="courier new,courier"&gt;othername&lt;/FONT&gt; instead of &lt;FONT face="courier new,courier"&gt;ndgtype&lt;/FONT&gt; .&lt;/P&gt;
&lt;P&gt;This worked for me on ISE 3.3 Patch 2:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl  --include  --insecure  --location \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --user $ISE_REST_USERNAME:$ISE_REST_PASSWORD  \
  --request POST https://$ISE_PPAN/ers/config/networkdevicegroup \
  --data '
{
  "NetworkDeviceGroup": {
    "name": "Location#All Locations#AA",
    "description": "...",
    "othername": "Location"
  }
}'

HTTP/1.1 201
Location: https://ise/ers/config/networkdevicegroup/718aad00-87ec-11ef-9c62-6ecbd13ff78e
Date: Fri, 11 Oct 2024 16:18:26 GMT&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 16:24:08 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5207350#M592396</guid>
      <dc:creator>thomas</dc:creator>
      <dc:date>2024-10-11T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: ISE v3.2 patch 5 - API Network Device Group Creation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5208562#M592437</link>
      <description>&lt;P&gt;Hello Thomas&lt;/P&gt;&lt;P&gt;I am now able to create a new NDG using CURL. I will repeat the same test using Python A.S.A.P..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thank you very much for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 14:59:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5208562#M592437</guid>
      <dc:creator>andrea80</dc:creator>
      <dc:date>2024-10-14T14:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: ISE v3.2 patch 5 - API Network Device Group Creation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5208582#M592438</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello Thomas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It works also with Python ... sooo many thanks again for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 15:33:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-v3-2-patch-5-api-network-device-group-creation/m-p/5208582#M592438</guid>
      <dc:creator>andrea80</dc:creator>
      <dc:date>2024-10-14T15:33:56Z</dc:date>
    </item>
  </channel>
</rss>

