โ† API reference
Query / devices

metricCorrelation

Compute statistical correlation between two metrics over a time range. Returns Pearson correlation coefficient, slope, intercept, R-squared, and covariance. Metrics are joined by 1-second time buckets. Uses Toolkit stats_agg() 2D. Requires metric:read permission.

Arguments

Correlation parameters

Returns MetricCorrelationResult!

Scalar fields at a glance

metricIdXMetricID!
metricIdYMetricID!
correlationFloat!
slopeFloat!
interceptFloat!
rSquaredFloat!
โ†— View the complete MetricCorrelationResult type

Explore in a view

Device Fleet
View exact SDL
"""
Compute statistical correlation between two metrics over a time range. Returns Pearson correlation coefficient, slope, intercept, R-squared, and covariance. Metrics are joined by 1-second time buckets. Uses Toolkit stats_agg() 2D. Requires metric:read permission.
"""
metricCorrelation(
  """Correlation parameters"""
  input: MetricCorrelationInput!
): MetricCorrelationResult! @topic(names: ["devices"])

Schema reference describes the API contract. Actual access is checked by the platform for every operation.