Hello,
I have 1 sensor with 30 channels. I want to have a historicdata in json for 1 specific channel of this 30 channels.
Here the closest I get so far:
http://xyz-prt/api/historicdata.json?id=2490&channelid=6&avg=0&sdate=2021-05-10-13-00-00&edate=2021-05-10-13-56-00
Sensor is 2490 and I want a historicdata from channel 6 from 13 - 13:56. But the "&channelid=6" is ignored in this case. I get the same historicdata with "&channelid=12" etc. How to do it?
Thnx in advantage.
Article Comments
Thanx for your answer,
just a last try:
api/historicdata.json?id=2490&channelid=6&avg=0&sdate=2021-05-10-13-00-00&edate=2021-05-10-13-56-00
I found out this gives me back the historical data of the last channel. Is there nothing to use like "&subid" or "&channelid" ?
Thank you!
May, 2021 - Permalink
I'm afraid that the API endpoint /api/historicdata.json doesn't take into account other parameters than the id of a sensor. Therefore, this is not possible to filter the channels returned by the API.
Regards.
May, 2021 - Permalink
Hello,
Thank you for your message.
Regarding what you would like to achieve, I'm afraid that there is no option to get the historic data of a specific channel only.
However, you have the possibility to filter the result via a script to only keep the channel you desire. The PowerShell module PRTGAPI can also help here. to process the data. Here is its documentation: https://github.com/lordmilko/PrtgAPI/wiki
I also invite you to open a feature request if there is no existing ones related to it, by following our guideline here: https://helpdesk.paessler.com/en/support/solutions/articles/76000063572-how-can-i-propose-new-features-or-sensors-for-prtg.
If you have questions, let us know.
Regards.
May, 2021 - Permalink