API Records Data and API Graph Data: Difference between pages
No edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
''Back to [[Cumulus MX Local API]]'' |
''Back to [[Cumulus MX Local API]]'' |
||
== All Time Records == |
|||
The all time records data response is designed for displaying on a web page, the text is formatted with HTML codes. |
|||
The general format of the |
The general format of the graph data API request is as follows... |
||
<pre>http://localhost:8998 |
<pre>http://localhost:8998/api/graphdata/xxxxx[?start=yyyy-MM-dd]</pre> |
||
Where xxxx is the specific request as below possibly followed by a startdate. If startdate is omitted you get the all data as present in [[https://www.cumuluswiki.org/a/Cumulusmx.db#The_Recent_History_Data_Table|the daily database]]. If startdate is present you get the subset of data present in the daily database starting on that date until the end. |
|||
Where xxxx is the specific request as below: |
|||
=== |
=== tempdata.json === |
||
Returns inside temp, dew point, apparent temp, feels like, wind chill, heat index, outdoor temp as a JSON object, each value is an array of timestamp (JavaScript number) and value pairs... |
|||
Returns all time temperature records. An example response is given below... |
|||
{ |
{ |
||
"intemp": [[timestamp1,value1],[timestamp2,value2]...], |
|||
"data": [ |
|||
"dew": [[timestamp1,value1],[timestamp2,value2]...], |
|||
["High temperature", "34.6 °C", "25 July 2019 15:39"], |
|||
"apptemp": [[timestamp1,value1],[timestamp2,value2]...], |
|||
["Low temperature", "-12.5 °C", "20 December 2010 07:17"], |
|||
"feelslike": [[timestamp1,value1],[timestamp2,value2]...], |
|||
["High dew point", "23.7 °C", "25 July 2019 16:35"], |
|||
"wchill": [[timestamp1,value1],[timestamp2,value2]...], |
|||
["Low dew point", "-13.5 °C", "20 December 2010 07:20"], |
|||
"heatindex": [[timestamp1,value1],[timestamp2,value2]...], |
|||
["High apparent temp", "38.7 °C", "25 July 2019 16:35"], |
|||
"temp": [[timestamp1,value1],[timestamp2,value2]...] |
|||
["Low apparent temp", "-15.8 °C", "20 December 2010 07:17"], |
|||
["High feels like", "37.6 °C", "25 July 2019 16:40"], |
|||
["Low feels like", "-12.5 °C", "20 December 2010 07:20"], |
|||
["High Humidex", "42.0 ", "12 August 2020 14:12"], |
|||
["Low wind chill", "-12.5 °C", "20 December 2010 07:17"], |
|||
["High heat index", "40.2 °C", "25 July 2019 16:35"], |
|||
["Highest minimum temp", "18.8 °C", "06 September 2016 04:07"], |
|||
["Lowest maximum temp", "-4.4 °C", "20 December 2010 00:00"], |
|||
["High daily temp range", "21.3 °C", "26 March 3912"], |
|||
["Low daily temp range", "0.9 °C", "19 January 2017"] |
|||
] |
|||
} |
} |
||
=== winddata.json === |
|||
Same as temp data... |
|||
=== humidity.json === |
|||
Returns all time humidity records. An example response is given below... |
|||
{ |
{ |
||
" |
"wgust": [[,],[,]...], |
||
"wspeed": [[,],[,]...] |
|||
["High humidity", "100 %", "23 January 2010 01:10"], |
|||
["Low humidity", "17 %", "25 March 2017 14:19"] |
|||
] |
|||
} |
} |
||
=== raindata.json === |
|||
Same as temp... |
|||
=== pressure.json === |
|||
{ |
{ |
||
" |
"rfall": [[,],[,]...], |
||
"rrate": [[,],[,]...] |
|||
["High pressure", "1048.5 hPa", "20 January 2020 00:09"], |
|||
["Low pressure", "962.9 hPa", "15 February 2014 00:13"] |
|||
] |
|||
} |
} |
||
=== pressdata.json === |
|||
Same as temp... |
|||
=== wind.json === |
|||
{ |
{ |
||
" |
"press": [[,],[,]...] |
||
["High gust", "53.0 mph", "12 February 2014 17:32"], |
|||
["High wind speed", "25.0 mph", "12 February 2014 17:35"], |
|||
["High daily windrun", "352.9 miles", "31 March 2015"] |
|||
] |
|||
} |
} |
||
=== wdirdata.json === |
|||
Same as temp... |
|||
=== rain.json === |
|||
{ |
{ |
||
" |
"bearing": [[,],[,]...], |
||
"avgbearing": [[,],[,]...] |
|||
["High rain rate", "230.4 mm/hr", "29 April 2016 01:52"], |
|||
["High hourly rain", "29.0 mm", "16 June 2016 16:09"], |
|||
["High daily rain", "44.6 mm", "16 June 2016"], |
|||
["Highest monthly rainfall", "170.6 mm", "October 2013"], |
|||
["Longest dry period", "26 days", "12 July 2018"], |
|||
["Longest wet period", "33 days", "19 January 2014"] |
|||
] |
|||
} |
} |
||
=== humdata.json === |
|||
Same as temp... |
|||
== Monthly Records == |
|||
The monthly records data response is designed for displaying on a web page, the text is formatted with HTML codes. |
|||
The general format of the records data API request is as follows... |
|||
<pre>http://localhost:8998:/api/records/month/ZZ/xxxxx</pre> |
|||
Where ZZ is the month number (1 - 12) and xxxx is the specific request as below: |
|||
=== temperature.json === |
|||
{ |
{ |
||
" |
"hum": [[,],[,]...], |
||
"inhum": [[,],[,]...] |
|||
["High temperature", "14.0 °C", "09 January 2015 22:45"], |
|||
["Low temperature", "-7.9 °C", "29 January 2011 08:07"], |
|||
["High dew point", "11.8 °C", "24 January 2016 19:34"], |
|||
["Low dew point", "-8.8 °C", "29 January 2011 08:10"], |
|||
["High apparent temp", "12.9 °C", "24 January 2016 14:38"], |
|||
["Low apparent temp", "-10.9 °C", "29 January 2011 08:26"], |
|||
["High feels like", "13.5 °C", "24 January 2016 14:40"], |
|||
["Low feels like", "-8.7 °C", "18 January 2013 18:19"], |
|||
["High Humidex", "-999.0 ", "01 January 0001 00:00"], |
|||
["Low wind chill", "-8.7 °C", "18 January 2013 18:19"], |
|||
["High heat index", "14.0 °C", "09 January 2015 22:45"], |
|||
["Highest minimum temp", "9.1 °C", "13 January 2011 00:15"], |
|||
["Lowest maximum temp", "0.2 °C", "23 January 2019 02:52"], |
|||
["High daily temp range", "10.4 °C", "01 January 2019"], |
|||
["Low daily temp range", "0.9 °C", "19 January 2017"] |
|||
] |
|||
} |
} |
||
=== solardata.json === |
|||
Same as temp... |
|||
=== humidity.json === |
|||
{ |
{ |
||
" |
"UV": [[,],[,]...], |
||
"SolarRad": [[,],[,]...], |
|||
["High humidity", "100 %", "15 February 2014 12:28"], |
|||
"CurrentSolarMax": [[,],[,]...] |
|||
["Low humidity", "31 %", "26 February 2019 14:44"] |
|||
] |
|||
} |
} |
||
=== sunhours.json === |
|||
Same as temp... |
|||
=== pressure.json === |
|||
{ |
{ |
||
" |
"sunshours": [[,],[,]...] |
||
["High pressure", "1043.6 hPa", "29 March 2020 13:34"], |
|||
["Low pressure", "975.7 hPa", "28 March 2016 04:23"] |
|||
] |
|||
} |
} |
||
=== dailyrain.json === |
|||
Same as temp... |
|||
=== wind.json === |
|||
{ |
{ |
||
" |
"dailyrain": [[,],[,]...] |
||
["High gust", "40.0 mph", "17 April 2013 20:14"], |
|||
["High wind speed", "22.0 mph", "29 April 2012 17:07"], |
|||
["High daily windrun", "258.9 miles", "29 April 2012"] |
|||
] |
|||
} |
} |
||
=== dailytemp.json === |
|||
=== rain.json === |
|||
{ |
{ |
||
" |
"mintemp": [[,],[,]...], |
||
"maxtemp": [[,],[,]...], |
|||
["High rain rate", "132.4 mm/hr", "28 May 2015 02:00"], |
|||
"avgtemp": [[,],[,]...] |
|||
["High hourly rain", "5.9 mm", "22 May 2011 02:10"], |
|||
} |
|||
["High daily rain", "25.2 mm", "19 May 2015"], |
|||
=== units.json or graphconfig.json === |
|||
["Highest monthly rainfall", "124.4 mm", "May 2015"], |
|||
Returns the units of measurement used for the graph values above. |
|||
["Longest dry period", "20 days", "21 May 2020"], |
|||
{ |
|||
["Longest wet period", "14 days", "18 May 2011"] |
|||
"temp": {"units": "C|F", "decimals": 0|1|2}, |
|||
] |
|||
"wind": {"units": "windunit", "decimals": N}, |
|||
"rain": {"units": "rainunit", "decimals": N}, |
|||
"press": {"units": "pressunit", "decimals": N}, |
|||
"hum": {decimals": N}, |
|||
"UV": {decimals": N} |
|||
} |
} |
||
== |
== Example response == |
||
A truncated response for humdata.json... |
|||
The this months records data response is designed for displaying on a web page, the text is formatted with HTML codes. |
|||
{"hum":[[1602861480000,75],[1602861540000,75],[1602861600000,75],[1602861660000,74],....]} |
|||
The responses are the same format as the monthly records above |
|||
The general format of the records data API request is as follows... |
|||
<pre>http://localhost:8998:/api/records/thismonth/xxxxx</pre> |
|||
Where xxxx is the specific request as below: |
|||
temperature.json |
|||
humidity.json |
|||
pressure.json |
|||
wind.json |
|||
rain.json |
|||
== This Year Records == |
|||
The this months records data response is designed for displaying on a web page, the text is formatted with HTML codes. |
|||
The responses are the same format as the monthly records above |
|||
The general format of the records data API request is as follows... |
|||
<pre>http://localhost:8998:/api/records/thismonth/xxxxx</pre> |
|||
Where xxxx is the specific request as below: |
|||
temperature.json |
|||
humidity.json |
|||
pressure.json |
|||
wind.json |
|||
rain.json |
|||
Revision as of 12:42, 23 September 2025
Back to Cumulus MX Local API
The general format of the graph data API request is as follows...
http://localhost:8998/api/graphdata/xxxxx[?start=yyyy-MM-dd]
Where xxxx is the specific request as below possibly followed by a startdate. If startdate is omitted you get the all data as present in [daily database]. If startdate is present you get the subset of data present in the daily database starting on that date until the end.
tempdata.json
Returns inside temp, dew point, apparent temp, feels like, wind chill, heat index, outdoor temp as a JSON object, each value is an array of timestamp (JavaScript number) and value pairs...
{
"intemp": [[timestamp1,value1],[timestamp2,value2]...],
"dew": [[timestamp1,value1],[timestamp2,value2]...],
"apptemp": [[timestamp1,value1],[timestamp2,value2]...],
"feelslike": [[timestamp1,value1],[timestamp2,value2]...],
"wchill": [[timestamp1,value1],[timestamp2,value2]...],
"heatindex": [[timestamp1,value1],[timestamp2,value2]...],
"temp": [[timestamp1,value1],[timestamp2,value2]...]
}
winddata.json
Same as temp data...
{
"wgust": [[,],[,]...],
"wspeed": [[,],[,]...]
}
raindata.json
Same as temp...
{
"rfall": [[,],[,]...],
"rrate": [[,],[,]...]
}
pressdata.json
Same as temp...
{
"press": [[,],[,]...]
}
wdirdata.json
Same as temp...
{
"bearing": [[,],[,]...],
"avgbearing": [[,],[,]...]
}
humdata.json
Same as temp...
{
"hum": [[,],[,]...],
"inhum": [[,],[,]...]
}
solardata.json
Same as temp...
{
"UV": [[,],[,]...],
"SolarRad": [[,],[,]...],
"CurrentSolarMax": [[,],[,]...]
}
sunhours.json
Same as temp...
{
"sunshours": [[,],[,]...]
}
dailyrain.json
Same as temp...
{
"dailyrain": [[,],[,]...]
}
dailytemp.json
{
"mintemp": [[,],[,]...],
"maxtemp": [[,],[,]...],
"avgtemp": [[,],[,]...]
}
units.json or graphconfig.json
Returns the units of measurement used for the graph values above.
{
"temp": {"units": "C|F", "decimals": 0|1|2},
"wind": {"units": "windunit", "decimals": N},
"rain": {"units": "rainunit", "decimals": N},
"press": {"units": "pressunit", "decimals": N},
"hum": {decimals": N},
"UV": {decimals": N}
}
Example response
A truncated response for humdata.json...
{"hum":[[1602861480000,75],[1602861540000,75],[1602861600000,75],[1602861660000,74],....]}