I use this REST API to get all sensors/probes from a device
wget - "http://<server>/api/table.json?content=sensor&filter_parentid=<an id>"
The content is like
"sensor": [ { "group": "UAT", "group_raw": "UAT", "device": "not google.com", "device_raw": "not google.com", "sensor": "The HTTP Push Sensor name", "sensor_raw": "The HTTP Push Sensor name", "status": "Unknown", "status_raw": 1 },
How to I get the "Identification Token" ? I looked at https://www.paessler.com/manuals/prtg/live_multiple_object_property_status#supported_output, but I did not see this column
Hello,
To get the token of the HTTP Push sensors, you can use this simple API:
/api/getobjectproperty.htm?id={id}&name=httppushtoken&show=text&username={username}&passhash={passhash}
However, you can only get the token of one sensor at a time. Therefore, to generate a list of sensors with their parameters, I recommend to use the PowerShell module called PRTGAPI. To get the token, you could use this command for example:
Get-Sensor -Id {id} | Get-ObjectProperty -Raw
The -Raw parameter is necessary to show the property httppushtoken that you can see in the example below:
name : HTTP Push Data Advanced
parenttags :
tags : PushSensor PushData HttpPushSensor
httppushmethod : ANY
httppushtoken : 022D8159-2AFC-4E61-A246-#####
writeresult : 0
lastpushmessagetime : 0
staygreen : 1
You will find the GitHub page of the module right here: https://github.com/lordmilko/PrtgAPI There is also a well documented wiki: https://github.com/lordmilko/PrtgAPI/wiki
Kind regards.
Sep, 2020 - Permalink