cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
762
Views
0
Helpful
1
Replies

Cisco Prime 3.6 - API PUT operation to rename APs not working

ernestob
Level 1
Level 1

Hello,

I have revised the documentation of Prime's API to modify APs details.

https://d1nmyq4gcgsfi5.cloudfront.net/media/pi_3_3_devnet/api/v3/index.html@id=structure-doc.html

https://d1nmyq4gcgsfi5.cloudfront.net/media/pi_3_3_devnet/api/v3/op/apService/accessPoint-PUT@_docs.html

 

I am trying to make massive changes to my APs names so I would like to do this in a programmatic way, I wrote a python script using "httpx" and "requests" library, and even though I can GET data using the API (to retrieve AP ids), when I send the payload with a PUT operation, even though I receive what seems like a "successful response" (according to the below documents), the APs remain unchanged.

https://developer.cisco.com/site/prime-infrastructure/documents/api-reference/rest-api-v3-1/v1/indexca24/?id=error-code-doc

and 

https://developer.cisco.com/site/prime-infrastructure/documents/api-reference/rest-api-v3-1/v1/index51bf/?id=structure-doc

 

I have also tried using cURL and Postman and I get the same result, so it's not python at fault. I have also tried using JSON and XML with the same result. I have also verified I have the correct API permissions on my user account.

 

I opened a Cisco TAC case and they just said my API calls seem fine and they cannot help me more than that, so hopefully someone has had this issue. 

 

Here is my cURL:

curl -k -X PUT -H "Content-Type: application/json" -d '{"unifiedApDetailsDTO": {"accessPointId": 105701829, "name": "siteX-ap04-b1f1"}}' "https://username:password@my_prime/webacs/api/v3/op/apService/accessPoint.json"

 

and the response I receive:

{
"mgmtResponse": {
"@requestUrl": "https://my_prime/webacs/api/v3/op/apService/accessPoint",
"@responseType": "operation",
"@rootUrl": "https://my_prime/webacs/api/v3/op",
"apJobInfo": [{
"jobName": "NBI_ModifyUnifiedAp_1650603640502_56",
"jobType": "NBI_ModifyUnifiedAp"
}]
}
}

 

I would really appreciate any help as I am stuck in this.

 

Thank you

 

1 Reply 1

Alex Stevenson
Cisco Employee
Cisco Employee

Hello @ernestob,

 

That must be frustrating.

 

Every example I see of using this API in cURL for is using a different format where "https..." comes at the beginning.

 

See...

 

Prime 3.2 API and curl not working correctly

API - GET ConfigVersions and CURL question

Prime Infrastructure - Using cURL