Anomaly detection with timeframe

Maybe you are looking for this the Metrics API - Metric selector — Dynatrace Docs ?