04-21-2022 10:04 PM
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
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.
and
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
05-18-2022 01:46 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide