I'd like to grab the sensor value, selected by channelid in json format:
api/table.xml?content=values&output=xml&columns=datetime,value_,coverage&id=123456&noraw=1&usecaption=true&count=10
returns the values of the channelids separately. I'd like to have this result in json format
api/table.xml?content=values&output=json&columns=datetime,value_,coverage&id=123456&noraw=1&usecaption=true&count=10
won't return the channel id (which i would like to filter by, I Don't want to filter the Json by Channel Caption but by ID)
Article Comments
Is this the API call you're looking for?
| /api/table.json?content=channels&output=json&columns=objid,name,lastvalue_&id=12456 |
The output will look like this:
{
"prtg-version":"17.3.32.2478",
"treesize":0,
"channels":[
{
"objid":-4,
"objid_raw":"*000000004",
"name":"Downtime",
"lastvalue":""
},
{
"objid":0,
"objid_raw":0,
"name":"Available Services",
"lastvalue":"100 %",
"lastvalue_raw":100.0000
},
{
"objid":2,
"objid_raw":2,
"name":"Office 365",
"lastvalue":"140 msec",
"lastvalue_raw":140.0000
},
{
"objid":10,
"objid_raw":10,
"name":"Youtube",
"lastvalue":"43 msec",
"lastvalue_raw":43.0000
}
]
}
Jul, 2017 - Permalink
Is this the API call you're looking for?
The output will look like this:
{ "prtg-version":"17.3.32.2478", "treesize":0, "channels":[ { "objid":-4, "objid_raw":"*000000004", "name":"Downtime", "lastvalue":"" }, { "objid":0, "objid_raw":0, "name":"Available Services", "lastvalue":"100 %", "lastvalue_raw":100.0000 }, { "objid":2, "objid_raw":2, "name":"Office 365", "lastvalue":"140 msec", "lastvalue_raw":140.0000 }, { "objid":10, "objid_raw":10, "name":"Youtube", "lastvalue":"43 msec", "lastvalue_raw":43.0000 } ] }Jul, 2017 - Permalink