ezeio2:apiref:samplelog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezeio2:apiref:samplelog [2019-10-28 20:23] andrehezeio2:apiref:samplelog [2021-09-24 23:04] (current) andreh
Line 5: Line 5:
 === Description === === Description ===
  
-<code>https://api.eze.io/v1/samplelog/{serial}/from={datetime}/to={datetime}/[fields]/[interval[,aggregation]]/["raw"]</code>+<code>https://api.eze.io/v1/samplelog/{serial}/from={datetime}/[to={datetime}]/[fields]/[interval[,aggregation]]/["raw"]</code>
  
  
Line 12: Line 12:
  
 | ''serial'' | The serial number of the ezeio (XYZ987) | | ''serial'' | The serial number of the ezeio (XYZ987) |
-| ''from=datetime'' | The beginning of the range. Format per RFC3339+| ''from=datetime'' | The beginning of the range. Format per RFC3339, or 1m/1h/1d 
-| ''to=datetime'' | The end of the range. Format per RFC3339. |+| ''to=datetime'' | The end of the range. Format per RFC3339. If omitted, current time is assumed. |
 | ''fields'' (optional) | Comma separated list of fields. Possible fields are 1-90, GPSx, GPSy, GPSz, GPSsignal. If not given, all fields are returned. | | ''fields'' (optional) | Comma separated list of fields. Possible fields are 1-90, GPSx, GPSy, GPSz, GPSsignal. If not given, all fields are returned. |
 | ''interval'' (optional) | Sample interval. Given as a number followed by 'd', 'h' or 'm' for day, hour or minute. | | ''interval'' (optional) | Sample interval. Given as a number followed by 'd', 'h' or 'm' for day, hour or minute. |
 | ''aggregation'' (optional) | Method of aggregation. Only valid if interval is given. | | ''aggregation'' (optional) | Method of aggregation. Only valid if interval is given. |
 | ''"raw"'' (optional) | Only return values actually stored in database. | | ''"raw"'' (optional) | Only return values actually stored in database. |
 +
 +The ''from'' parameter can be given as number of minutes/hours/days relative to current time. For example ''from=3d'' means "3 days ago".
  
 If no interval is given, an automatic interval will be calculated based on the size of the range. This is to ensure the amount of data returned is reasonable. If no interval is given, an automatic interval will be calculated based on the size of the range. This is to ensure the amount of data returned is reasonable.
Line 36: Line 38:
 ''min'' : The smallest value\\ ''min'' : The smallest value\\
 ''max'' : The largest value\\ ''max'' : The largest value\\
-''sum'' : The sum of all samples in the interval+''sum'' : The sum of all samples in the interval\\ 
 +''spread'' : The difference between the highest and the lowest value in the interval\\ 
 +''count'' : The number of samples in the interval
  
 <WRAP center round info 80%> <WRAP center round info 80%>
-Only fields configured for higher logging rates than 10 minutes will be returned.+Only data from fields configured for higher logging rates than 10 minutes will be returned. See the [[ezeio2:apiref:syslog|syslog]] API for other fields.
 </WRAP> </WRAP>
  
  • ezeio2/apiref/samplelog.1572294199.txt.gz
  • Last modified: 2019-10-28 20:23
  • by andreh