I'm interested to hear a response to this question. I have a similar use case.
In a related question, has anyone used SteelScript App Framework or the NetProfiler REST API to automate the process of retrieving the contents of a remote text file which would be used to update the ByLocation definitions file?
I had to backtrack on this a bit as after discussing it with our APM SE it appeared that using a single policy for multiple interface threshold alerting was fundamentally flawed. The recommendation was to create a policy per interface which should prevent the appearance of 255.255.255.255 and therefore not require access to the event details (which also seems to be impossible via the API at the moment).
So... as the prospect of managing per interface policies manually was just too horrendous to contemplate, I wrote a Python script that gets a list of SteelHead interfaces from the NetProfiler via the REST API, then uses that to create and managed a User Defined Interface Policy for each (that was 144 policies at the last count, created in 7 minutes via the script).
I haven't checked the SNMP trap as yet (too much else to do at the moment), but assuming it or the event summary list now shows me the interface ip and index it should be pretty easy to run a top talkers interface report every time we get an alert. As an interim solution I did get my policy script to add a URL to the description field that now lets us click through to an interface report for the violating interface.
To your other question, I have similar plans (as well as updating bandwidth overrides based on WAN router configs). I would suggest checking the API documentation and using something like Insomnia to probe the REST URLs.
Also, the NetProfiler has some great online help and live examples built in, you should be able to access via this URL:
The go to "General Info / Coding Examples / Reports / Python" for some example code that contains a bunch of routines that can be called to do the GET and POST functions (as well as being used to template PUT and DELETE actions).
Hope that helps some...
I just wanted to loop back and close this one off as I've more or less arrived at a solution.
After avoiding per interface policies on NetProfiler for a long time due to the onerous nature of creating and managing them consistently I wrote a Python scipt to create user-defined Interface policies via the REST API. It then struck me that I should be able to create Link Congestion Policies under Performance and Availability to leverage the NetProfiler's analytics engine and produce significantly more useful violation alerts.
Unfortunately, although you can create User-defined Policies and Service Maps via the REST API, the facility to do anything with Performance and Availability Policies is not present (I've asked our SE to raise an enhancement request for this).
Now this is were it gets contentious as CLI commands exist on the NetProfiler to create the policies I require, however use of these are not supported for Partner or Customer use. I did manage to create a Bash shell script in the 'lab' that extracted a list of known WAN interfaces from NetProfiler, and then created an XML file containing policy definitions that was then fed back in via another CLI command.
This appears to work well and didn't break anything, however I look forward to REST API support for the Performance and Availability Policies arriving!