Ok, I see where the confusion is coming from, I use Postman app to test the api, and I just realised that I've been looking at "Prettified" response, where response objects look like this:
...
{
"datetime": "5/30/2017 12:00:00 AM - 12:05:00 AM",
"datetime_raw": 42885.0034722222,
"value": "0 %",
"value_raw": 0,
"coverage": "100 %",
"coverage_raw": 10000
},
...
In fact this is only part of the actual response object as the api returns invalid json with duplicated fields:
...
{
"datetime": "5/30/2017 12:00:00 AM - 12:05:00 AM",
"datetime_raw": 42885.0034722222,
"value": "100 %",
"value_raw": 100.0000,
"value": "3 %",
"value_raw": 3.0000,
"value": "73 %",
"value_raw": 73.0000,
"value": "6,013 MByte",
"value_raw": 6305165312.0000,
"value": "0 %",
"value_raw": 0.0000,
"coverage": "100 %",
"coverage_raw": 10000
}
...
If I request xml I get this which makes much more sense:
...
<item>
<datetime>5/23/2017 12:00:57 AM</datetime>
<datetime_raw>42878.0006680093</datetime_raw>
<value channel="Health" channelid="0">100 %</value>
<value_raw channel="Health" channelid="0">100.0000</value_raw>
<value channel="System CPU Load" channelid="1">3 %</value>
<value_raw channel="System CPU Load" channelid="1">3.0000</value_raw>
<value channel="Available Memory Percent" channelid="2">66 %</value>
<value_raw channel="Available Memory Percent" channelid="2">66.0000</value_raw>
<value channel="Available Memory" channelid="3">5,369 MByte</value>
<value_raw channel="Available Memory" channelid="3">5629648896.0000</value_raw>
<coverage>100 %</coverage>
<coverage_raw>0000010000</coverage_raw>
</item>
...
I don't really need xml, is it possible to filter out the returned channel? I guess I only need "Health" channel really
Thanks!
Add comment