pub struct LatestDatapointsQuery {
pub before: Option<String>,
pub target_unit: Option<String>,
pub target_unit_system: Option<String>,
pub include_status: Option<bool>,
pub ignore_bad_data_points: Option<bool>,
pub treat_uncertain_as_bad: Option<bool>,
pub id: Identity,
}Expand description
Query for retrieving the latest datapoint in a time series.
Fields§
§before: Option<String>Get data points before this time.
The format is ‘now’ or N[timeunit]-ago where timeunit is w,d,h,m,s.
Example: 2d-ago gets data that is up to two days old.
You can also specify time in milliseconds since epoch.
target_unit: Option<String>The unit externalId of the data points returned. If the time series does not have a unitExternalId that can be converted to the targetUnit, an error will be returned. Cannot be used with targetUnitSystem.
target_unit_system: Option<String>The unit system of the data points returned. Cannot be used with targetUnit.
include_status: Option<bool>Show the status code for each data point in the response. Good (code = 0) status codes are always omitted. Only relevant for raw data points queries, not aggregates.
Default false
ignore_bad_data_points: Option<bool>Treat data points with a Bad status code as if they do not exist.
If set to false, raw queries will include bad data points in the response, and aggregates will in general omit the time period between a bad data point and the next good data point. Also, the period between a bad data point and the previous good data point will be considered constant.
Default true
treat_uncertain_as_bad: Option<bool>Treat data points with Uncertain status codes as Bad. If false, treat data points with Uncertain status codes as Good. Used for both raw queries and aggregates.
Default true
id: IdentityID or external ID of time series to retrieve data from.
Implementations§
Trait Implementations§
Source§impl Clone for LatestDatapointsQuery
impl Clone for LatestDatapointsQuery
Source§fn clone(&self) -> LatestDatapointsQuery
fn clone(&self) -> LatestDatapointsQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more