cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
363
Views
0
Helpful
4
Replies

How to update AP name and locationHierarchy using Cisco Prime APIs

dcollin5
Level 1
Level 1

Can anyone provide an example of  updating the AP information using the Cisco prime APIs, and also what XML Format is accepted by Prime?

Im trying to use the webacs/api/v4/op/apService/accessPoint-PUT?_docs, but not sure if its correct, as the response is always 500 for my input.

Ideally I want to update the following two parameters in the api/v4/data/AccessPointDetails page.

<name>

<locationHierarchy>

4 Replies 4

marce1000
VIP
VIP

 

 - Try the following :

<?xml version="1.0" encoding="UTF-8"?>
<apCandidate>
<apNames>
<apName>AP-NAME</apName>
</apNames>
<accessPointConfiguration>
<name>NEW-AP-NAME</name>
<locationHierarchy>
<location>
<locationName>NEW-LOCATION-NAME</locationName>
</location>
</locationHierarchy>
</accessPointConfiguration>
</apCandidate>

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

dcollin5
Level 1
Level 1

Thank you. It didnt work.
Actually, the API information was correct - /webacs/api/v4/op/apService/accessPoint.
I was posting auth_headers "Content-Type": "application/json", When I should have been using Content-Type": "text/xml",

 e.g.,
<?xml version="1.0" ?>
<unifiedApDetailsDTO>
<accessPointId>{}</accessPointId>
<name>{}</name>
<location>{}</location>
<mapLocation>{}</mapLocation>
</unifiedApDetailsDTO>


I want to update the MAP location. Basically, get the AP to show up on a WiFi Map. Is it possible to specify a map using the /webacs/api/v4/op/apService/accessPoint end point? Note, I tried a combination of your suggestion, but that did not work <locationHierarchy><location><locationName>NEW-LOCATION-NAME</locationName></location></locationHierarchy>

 

dcollin5
Level 1
Level 1

Just to note, I dont seem to be able to update the following tag:

"<locationHierarchy>Root Area</locationHierarchy>"
 

dcollin5
Level 1
Level 1

As a reference, here is the code I am writing. 

https://github.com/dcollin5/ciscoprime-update-ap

Review Cisco Networking for a $25 gift card