It would be really interesting to extend the PC or DA REST API to allow SNMP Profiles management. Today, we can only get/get list, but there is no delete or update ability. Don't you think it's worth it?
I'm just noticing one problem though... SNMP Profiles are not deleted from the DA when you do such a thing... I'm a bit stuck now... Is there any way to get rid of those profiles from DA? (even not "official")
Well, actually, it's not very well documented, but it exists and works (at least in 3.0+). Here is the method, up to you to automate it (I had to use a bit of Notepad++ and curl in cygwin, because I had nothing else on the remote server I was working on, but any other method will work).
First you need to do:
GET on https://<CAPC_URL>:8182/pc/center/webservice/profiles
==> You will get a response body containing all profiles with their <profileID>.
Note: if you need to verify the profile is not used, you can do a GET on https://<CAPC_URL>:8182/pc/center/webservice/profiles/profileItemId/<profileID>/numberOfDevicesAssigned for each of the profileID retrieved in the previous step, it will return the number of assigned devices.
Then, you need to do on each profile you want to delete.:
DELETE on https://<CAPC_URL>:8182/pc/center/webservice/profiles/profileItemId/<profileID>
==> The profile corresponding to the given profileID is deleted.