Hello,
I'm trying to use API call to enable/disable all monitors for all devices in a particular group. I see in the documentation there is a way to reference the group, but no examples. Does anyone have a sample API call to disable devices by group?
Thanks in advance
Article Comments
You could simply use the pause API call with the ID of the group to pause the entire group:
pause
/api/pause.htm?id=objectid&pausemsg=yourmessage&action=0
resume
/api/pause.htm?id=objectid&action=1
The first one will pause it indefinitely, the other resumes it :) Replace objectid accordingly. PRTGapi (see signature) is even easier:
# get devies of a group and pause them indefinitely
Get-Device -Group (Get-Group -Id <groupid>) | Pause-Object -Forever
# resume the devices within that group
Get-Device -Group (Get-Group -Id <groupid>) | Resume-Object
PRTGapi |
Feature Requests |
WMI Issues |
SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Mar, 2019 - Permalink
You could simply use the pause API call with the ID of the group to pause the entire group:
pause
/api/pause.htm?id=objectid&pausemsg=yourmessage&action=0
resume
/api/pause.htm?id=objectid&action=1
The first one will pause it indefinitely, the other resumes it :) Replace objectid accordingly. PRTGapi (see signature) is even easier:
PRTGapi | Feature Requests | WMI Issues | SNMP Issues
Kind regards,
Stephan Linke, Tech Support Team
Mar, 2019 - Permalink