Extreme Campus Controller

 View Only

 XXC Api to update AP description

Franz Steinhauser's profile image
Franz Steinhauser posted 01-19-2022 10:26

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?


Miguel-Angel RODRIGUEZ-GARCIA's profile image
If you use the base API, you need to read the full config, modify what you want and push it back to the XCC.
Another way is to use the xccsdk library: https://test.pypi.org/project/pyxccsdk/ which makes things a little bit easier.
Gareth Mitchell's profile image
Gareth Mitchell
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&

Franz Steinhauser's profile image
Franz Steinhauser
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's profile image
Gareth Mitchell
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:


I hope this helps

Attachment  View in library
Paulo Francisco's profile image
Paulo Francisco
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.