<?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 ERS API: Network Device PUT / Update Operation in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4062382#M559492</link>
    <description>Just hit the same problem, you've saved the day for me Johannes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Thu, 09 Apr 2020 04:55:32 GMT</pubDate>
    <dc:creator>ViktorMendes69101</dc:creator>
    <dc:date>2020-04-09T04:55:32Z</dc:date>
    <item>
      <title>ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4001821#M454868</link>
      <description>&lt;P&gt;Hi board,&lt;/P&gt;&lt;P&gt;I'm using ISE 2.4 Patch 9 and I want to change attributes (e.g. description) on an existing network device.&lt;/P&gt;&lt;P&gt;So, first of all I find out the ID for the network device I want to change. Here are the device details for the existing device:&lt;/P&gt;&lt;PRE&gt;$ curl -H "Accept:application/json" -H "Content-Type:application/json" -u ers-query -p -k https://10.20.131.1:9060/ers/config/networkdevice/8ecaa490-2312-11ea-807e-0050568b5bee&lt;BR /&gt;Enter host password for user 'ers-query':&lt;BR /&gt;{&lt;BR /&gt;  "NetworkDevice" : {&lt;BR /&gt;    "id" : "8ecaa490-2312-11ea-807e-0050568b5bee",&lt;BR /&gt;    "name" : "Bla123",&lt;BR /&gt;    "description" : "",&lt;BR /&gt;[...]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if I want to update the description, I'll use the following PUT body&lt;/P&gt;&lt;PRE&gt;{
  "NetworkDevice": {
     "description": "newDescription"&lt;BR /&gt;  }
}&lt;/PRE&gt;&lt;P&gt;CURL request&lt;/P&gt;&lt;PRE&gt;$ curl -X PUT -H "Accept:application/json" -H "Content-Type:application/json" -d '{"NetworkDevice": {"description": "newDescription"}}' -u ers-query -p -k https://10.20.131.1:9060/ers/config/networkdevice/8ecaa490-2312-11ea-807e-0050568b5bee
Enter host password for user 'ers-query':
{
  "ERSResponse" : {
    "operation" : "PUT-update-networkdevice",
    "messages" : [ {
      "title" : "Validation Error - Illeagal values: [The valid name can contain alphanumeric, hyphen(-), period(.) and underscore(_)]",
      "type" : "ERROR",
      "code" : "Application resource validation exception"
    } ],
    "link" : {
      "rel" : "related",
      "href" : "https://10.20.131.1:9060/ers/config/networkdevice/8ecaa490-2312-11ea-807e-0050568b5bee",
      "type" : "application/xml"
    }
  }&lt;/PRE&gt;&lt;P&gt;The same happens if I try this with Postman... Any idea what I'm doing wrong here?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 10:46:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4001821#M454868</guid>
      <dc:creator>Johannes Luther</dc:creator>
      <dc:date>2019-12-20T10:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002002#M454872</link>
      <description>Maybe try something along these lines in a py script:&lt;BR /&gt;API_DEVICE = "&lt;A href="https://10.20.131.1:9060/ers/config/networkdevice/8ecaa490-2312-11ea-807e-0050568b5bee" target="_blank"&gt;https://10.20.131.1:9060/ers/config/networkdevice/8ecaa490-2312-11ea-807e-0050568b5bee&lt;/A&gt;"&lt;BR /&gt;API_ERS_USER = "&amp;lt;user&amp;gt;","&amp;lt;pass&amp;gt;"&lt;BR /&gt;API_DATA = ({&lt;BR /&gt;"ERSEndPoint" : {&lt;BR /&gt;"description" : &amp;lt;DESC&amp;gt;,&lt;BR /&gt;}&lt;BR /&gt;})&lt;BR /&gt;r = requests.put(url=API_DEVICE, auth=API_ERS_USER, verify=True, json=API_DATA)</description>
      <pubDate>Fri, 20 Dec 2019 16:05:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002002#M454872</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2019-12-20T16:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002091#M455003</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/833210"&gt;@Mike.Cifelli&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;API_DATA = ({&lt;BR /&gt;"ERSEndPoint" : {&lt;BR /&gt;"description" : &amp;lt;DESC&amp;gt;,&lt;BR /&gt;}&lt;BR /&gt;})&lt;BR /&gt;r = requests.put(url=API_DEVICE, auth=API_ERS_USER, verify=True, json=API_DATA)&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;thanks for your reply. However, you're using "ERSEndpoint" as top level key element. According to the documentation. the top level element for network devices should be "NetworkDevice" (as shown in the GET request)&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 18:23:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002091#M455003</guid>
      <dc:creator>Johannes Luther</dc:creator>
      <dc:date>2019-12-20T18:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002106#M455004</link>
      <description>Apologies. Snippet was from endpoint script I have. Update accordingly. I will try to test this in my lab.</description>
      <pubDate>Fri, 20 Dec 2019 19:23:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002106#M455004</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2019-12-20T19:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002732#M455005</link>
      <description>Pull up your ERS SDK and go to API documentation. Under network device it will show you what fields are required to perform proper update via put as well as xml &amp;amp; json examples.</description>
      <pubDate>Mon, 23 Dec 2019 15:15:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4002732#M455005</guid>
      <dc:creator>Mike.Cifelli</dc:creator>
      <dc:date>2019-12-23T15:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4007504#M455006</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/833210"&gt;@Mike.Cifelli&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Pull up your ERS SDK and go to API documentation. Under network device it will show you what fields are required to perform proper update via put as well as xml &amp;amp; json examples.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;of course I did that. The ERS documentation isn't very helpful in this regard.&lt;/P&gt;&lt;P&gt;By fiddling around, I found the solution (which is not documented of course)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tl;tr summary:&lt;/P&gt;&lt;P&gt;The Network Device Update (PUT) request &lt;STRONG&gt;must &lt;/STRONG&gt;contain:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The &lt;STRONG&gt;name &lt;/STRONG&gt;attribute - regardless whether the name is subject to change or not&lt;/LI&gt;&lt;LI&gt;The &lt;STRONG&gt;NetworkDeviceIPList&lt;/STRONG&gt; attribute with the child elements &lt;STRONG&gt;ipaddress &lt;/STRONG&gt;and &lt;STRONG&gt;mask&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Note: I tested it for JSON data only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for example, if the description of a network device should be changed, the following PUT body data would work:&lt;/P&gt;&lt;PRE&gt;{&lt;BR /&gt;  "NetworkDevice" : {&lt;BR /&gt;  "name" : "currentName"&lt;BR /&gt;  "description" : "new description",&lt;BR /&gt;  "NetworkDeviceIPList" : [ {&lt;BR /&gt;    "ipaddress" : "192.0.2.1",&lt;BR /&gt;    "mask" : 32&lt;BR /&gt;    } ]&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found no indication in the ERS SDK documentation about this behavior. By the way: In the meantime I updated to ISE 2.4 patch 11 and the behavior is still the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I guess it's another TAC case here &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 12:13:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4007504#M455006</guid>
      <dc:creator>Johannes Luther</dc:creator>
      <dc:date>2020-01-07T12:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4062382#M559492</link>
      <description>Just hit the same problem, you've saved the day for me Johannes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 09 Apr 2020 04:55:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4062382#M559492</guid>
      <dc:creator>ViktorMendes69101</dc:creator>
      <dc:date>2020-04-09T04:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: ISE ERS API: Network Device PUT / Update Operation</title>
      <link>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4696982#M577508</link>
      <description>&lt;P&gt;Hi Johannes!&lt;/P&gt;
&lt;P&gt;Unfortunately, this does not work for me .. and whatever I try, it always fails with:&lt;/P&gt;
&lt;P&gt;&amp;lt; HTTP/1.1 405 Method Not Allowed&lt;BR /&gt;HTTP/1.1 405 Method Not Allowed&lt;BR /&gt;&amp;lt; Transfer-Encoding: chunked&lt;BR /&gt;Transfer-Encoding: chunked&lt;/P&gt;
&lt;P&gt;Below is my request. I am simply trying to change the device name .. without any success. ISE version is quite old, but all other requests (GET, POST, DELETE) works perfectly fine . I will be really thankful if someone can give a tip.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;curl \
-vvv \
--noproxy "*" \
--include \
--insecure \
--user ers-usr2:Password1234 \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic ZXJzLXVzcjI6UGFzc3dvcmQxMjM0' \
--request put https://x.x.x.x:9060/ers/config/networkdevice/5678 \
--data '
{
  "NetworkDevice" : {
    "id" : "5678",
    "name" : "NEW_NAME",
    "authenticationSettings" : {
      "networkProtocol" : "RADIUS",
      "radiusSharedSecret" : "******",
      "enableKeyWrap" : false,
      "keyInputFormat" : "ASCII"
    },
    "tacacsSettings" : {
      "sharedSecret" : "******",
      "connectModeOptions" : "OFF",
      "previousSharedSecret" : "test123",
      "previousSharedSecretExpiry" : 0
    },
    "profileName" : "Cisco",
    "coaPort" : 1700,
    "link" : {
      "rel" : "self",
      "href" : "https://x.x.x.x:9060/ers/config/networkdevice/5678",
      "type" : "application/xml"
    },
    "NetworkDeviceIPList" : [ {
      "ipaddress" : "192.168.4.5",
      "mask" : 32
    } ],
    "NetworkDeviceGroupList" : [ "Device Type#All Device Types#IPC#ROUTER#PE", "IPSEC#Is IPSEC Device#No", "Location#All Locations" ]
  }
}' &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 21:34:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/ise-ers-api-network-device-put-update-operation/m-p/4696982#M577508</guid>
      <dc:creator>a.mitsova</dc:creator>
      <dc:date>2022-09-30T21:34:14Z</dc:date>
    </item>
  </channel>
</rss>

