cancel
Showing results for 
Search instead for 
Did you mean: 

XXC Api to update AP description

XXC Api to update AP description

FranzS
New Contributor
Hi,

We are trying to use the API to update de description field of an AP.
Looking at the API documentation the following fields are required to PUT:
serialNumber, hardwareType and apName
But when trying to use the PUT call I get the following error:

 Validation of \"ip\" failed; ip_addr/gateway/netmask should be set or

 "Validation of \"radios\" failed; may not be null" 

All APs used DHCP to get their IP address and IpAddress is not a mandatory field, so how should I interpret this message?
Or are other fields also mandatory?

Thanks,
Franz

5 REPLIES 5

Paulo_Francisco
Extreme Employee
Hi Franz,
Attached is a sample python script exemplifying how to interact directly with the REST API to change a given AP's description. Its not Powershell, but  should provide with with the structure and list of operations that you could translate. 

As @Miguel-Angel RODRIGUEZ-GARCIA mentions, we would actually recommend you consider the XCC Python SDK (https://test.pypi.org/project/pyxccsdk/). The SDK abstracts most of the REST API operations as standard Python objects therefore greatly simplifying your application development.

​​

Gareth_Mitchell
Extreme Employee
Hi Franz

I would recommend in the early stages to use a tool like Insomnia or Postman to test out your calls while you get used to the formatting etc.  I have attached a json from my lab but it's better if you pull your data first with a GET then make your change with a PUT.  In this example I changed the description from NULL to "GARETH Test"

Screenshots from insomnia:

3fc6ea4d4f84403eb0e85f5d6134e753.png
4db89606e3e340358c8a54b9bc4223d8.png
GUI:

67867366db2345818362ac5ca9c09244.png
I hope this helps

-Gareth

FranzS
New Contributor
We are pretty new to the use of this API.
Getting info out of the system is no issue, but when trying to send info back, we keep running into issues.
Is there perhaps somewhere a working example of a json file for an AP?
BTW we are trying to use powershell instead of python, I can try python, but I don't think that will be the issue?
Even when I read the complete AP config from the API and I use that to put it back into to the AP with the API it is not working (different error Cannot deserialize instance of ...)

Gareth_Mitchell
Extreme Employee
Hi Franz

In addition to what Mig said, you can also use the XCC GUI to find out what API calls it makes, see this article: https://extremeportal.force.com/ExtrArticleDetail?an=000093035&

-Gareth
GTM-P2G8KFN