<?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: XCC API PUT in ExtremeCloud IQ Controller</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83475#M192</link>
    <description>&lt;P&gt;Hello Mig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the update. I&amp;nbsp;have tried reading and writing the complete config.&lt;/P&gt;&lt;P&gt;Much overhead but works.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2020 16:54:54 GMT</pubDate>
    <dc:creator>StephanH</dc:creator>
    <dc:date>2020-12-22T16:54:54Z</dc:date>
    <item>
      <title>XCC API PUT</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83471#M188</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to change values on an AP via XCC API. According the API doc (&lt;A href="https://documentation.extremenetworks.com/Extreme%20Campus%20Controller/v5.16/API/index_rest_gateway.html" target="_blank" rel="nofollow noreferrer noopener"&gt;https://documentation.extremenetworks.com/Extreme%20Campus%20Controller/v5.16/API/index_rest_gateway.html&lt;/A&gt;)&amp;nbsp; three values are required:&lt;/P&gt;&lt;P&gt;serialNumber, hardwareType, apName&lt;/P&gt;&lt;P&gt;accordingly, I send the following call:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;changes&amp;nbsp;=&amp;nbsp;{"serialNumber"&amp;nbsp;:&amp;nbsp;"2011Y-1111100000","hardwareType"&amp;nbsp;:&amp;nbsp;"AP310i-WR",&amp;nbsp;"apName"&amp;nbsp;:&amp;nbsp;"2011Y-1111100000"",&amp;nbsp;"description"&amp;nbsp;:&amp;nbsp;"ForTesing"}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;resp&amp;nbsp;=&amp;nbsp;requests.put(url&amp;nbsp;+&amp;nbsp;"management/v1/aps/2011Y-1111100000"",&amp;nbsp;json=changes,&amp;nbsp;headers=headers,&amp;nbsp;verify=False)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;And I receive the following:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;{'errors': [{'errorMessage': 'Validation of "ip" failed; ip_addr/gateway/netmask should be set', 'resource': 'AccessPointManager configureAccessPoint.arg1.ip', 'errorCode': 422, 'invalidValue': 'com.extremenetworks.exol.exolcore.restapi.elements.AccessPointElement@571f4c81'}, {'errorMessage': 'Validation of "radios" failed; may not be null', 'resource': 'AccessPointManager configureAccessPoint.arg1.radios', 'errorCode': 422, 'invalidValue': ''}]}&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems I have add more values to the request. But I can’t see that requirement in the API docu. In addition I don't want to add so many values when I only want to change the description.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone tried to change individual values successfully?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 15:57:51 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83471#M188</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2020-12-22T15:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: XCC API PUT</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83472#M189</link>
      <description>&lt;P&gt;Stephan,&lt;/P&gt;&lt;P&gt;I changed the channels of hundreds AP’s at once with the API very easily.&lt;/P&gt;&lt;P&gt;You must GET the current config and modify the parameter you want to change and then send back the full config adapted.&lt;/P&gt;&lt;P&gt;Here a piece of code I use:&lt;/P&gt;&lt;PRE&gt;r = requests.get(server + &lt;SPAN style="color:#a5c261;"&gt;"/management/v1/aps/{0}"&lt;/SPAN&gt;.format(AP[&lt;SPAN style="color:#a5c261;"&gt;'serialNumber'&lt;/SPAN&gt;])&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#aa4926;"&gt;headers&lt;/SPAN&gt;=headers&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#aa4926;"&gt;verify&lt;/SPAN&gt;=&lt;SPAN style="color:#8888c6;"&gt;False&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;PRE&gt;body = json.loads(r.content)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color:#cc7832;"&gt;if &lt;/SPAN&gt;AP[&lt;SPAN style="color:#a5c261;"&gt;'Channel_2.4GHz'&lt;/SPAN&gt;]:    body[&lt;SPAN style="color:#a5c261;"&gt;'radios'&lt;/SPAN&gt;][RADIO_MAPPING[body[&lt;SPAN style="color:#a5c261;"&gt;'hardwareType'&lt;/SPAN&gt;]][&lt;SPAN style="color:#a5c261;"&gt;'2G'&lt;/SPAN&gt;]][&lt;SPAN style="color:#a5c261;"&gt;'reqChannel'&lt;/SPAN&gt;] = AP[&lt;SPAN style="color:#a5c261;"&gt;'Channel_2.4GHz'&lt;/SPAN&gt;]    body[&lt;SPAN style="color:#a5c261;"&gt;'radios'&lt;/SPAN&gt;][RADIO_MAPPING[body[&lt;SPAN style="color:#a5c261;"&gt;'hardwareType'&lt;/SPAN&gt;]][&lt;SPAN style="color:#a5c261;"&gt;'2G'&lt;/SPAN&gt;]][&lt;SPAN style="color:#a5c261;"&gt;'useSmartRf'&lt;/SPAN&gt;] = &lt;SPAN style="color:#8888c6;"&gt;False&lt;/SPAN&gt;r = requests.put(server + &lt;SPAN style="color:#a5c261;"&gt;"/management/v1/aps/{0}"&lt;/SPAN&gt;.format(body[&lt;SPAN style="color:#a5c261;"&gt;'serialNumber'&lt;/SPAN&gt;])&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#aa4926;"&gt;json&lt;/SPAN&gt;=body&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#aa4926;"&gt;headers&lt;/SPAN&gt;=headers&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color:#aa4926;"&gt;verify&lt;/SPAN&gt;=&lt;SPAN style="color:#8888c6;"&gt;False&lt;/SPAN&gt;)&lt;SPAN style="color:#cc7832;"&gt;if &lt;/SPAN&gt;r.status_code != &lt;SPAN style="color:#6897bb;"&gt;200&lt;/SPAN&gt;:    &lt;SPAN style="color:#808080;"&gt;# This means something went wrong.&lt;/SPAN&gt;&lt;SPAN style="color:#808080;"&gt;    &lt;/SPAN&gt;RESULT += &lt;SPAN style="color:#a5c261;"&gt;'error on {}&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#a5c261;"&gt;'&lt;/SPAN&gt;.format(AP)&lt;SPAN style="color:#cc7832;"&gt;else&lt;/SPAN&gt;:    RESULT += &lt;SPAN style="color:#a5c261;"&gt;'OK for {}&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#a5c261;"&gt;'&lt;/SPAN&gt;.format(AP)&lt;SPAN style="color:#cc7832;"&gt;print&lt;/SPAN&gt;(&lt;SPAN style="color:#a5c261;"&gt;'RESULT&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;\n&lt;/SPAN&gt;&lt;SPAN style="color:#a5c261;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color:#cc7832;"&gt;, &lt;/SPAN&gt;RESULT)&lt;/PRE&gt;&lt;P&gt;Enjoy&lt;/P&gt;&lt;P&gt;Mig&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:08:37 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83472#M189</guid>
      <dc:creator>Miguel-Angel_RO</dc:creator>
      <dc:date>2020-12-22T16:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: XCC API PUT</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83473#M190</link>
      <description>&lt;P&gt;Hi Mig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the fast answer.&amp;nbsp;I suspected that I would have to read and write the whole config, based on the response I got to the request.&lt;/P&gt;&lt;P&gt;But that is not described in the documentation, is it?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:19:03 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83473#M190</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2020-12-22T16:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: XCC API PUT</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83474#M191</link>
      <description>&lt;P&gt;Stephan&lt;/P&gt;&lt;P&gt;I got that info from the support&lt;/P&gt;&lt;P&gt;Mig&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:47:17 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83474#M191</guid>
      <dc:creator>Miguel-Angel_RO</dc:creator>
      <dc:date>2020-12-22T16:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: XCC API PUT</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83475#M192</link>
      <description>&lt;P&gt;Hello Mig,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for the update. I&amp;nbsp;have tried reading and writing the complete config.&lt;/P&gt;&lt;P&gt;Much overhead but works.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:54:54 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83475#M192</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2020-12-22T16:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: XCC API PUT</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83476#M193</link>
      <description>&lt;P&gt;Stephan,&lt;/P&gt;&lt;P&gt;Be carefull with some bugs depending on the versions.&lt;/P&gt;&lt;P&gt;Don’t play with the led-status, it could crashes the GUI, the bug seems not present on all releases/platforms and is to be corrected in the next release.&lt;/P&gt;&lt;P&gt;If you change that, go via CLI on the XCC to change back the led-status to recover the GUI.&lt;/P&gt;&lt;P&gt;Mig&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2020 16:58:20 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-controller/xcc-api-put/m-p/83476#M193</guid>
      <dc:creator>Miguel-Angel_RO</dc:creator>
      <dc:date>2020-12-22T16:58:20Z</dc:date>
    </item>
  </channel>
</rss>

