get_metric_time_series
Retrieve time-series data for a specific Fulcra metric within a defined time range. Specify start and end times, optional sample rate, null replacement, and calculations. Outputs JSON data points, translating timestamps to the user’s local timezone.
Instructions
Get user's time-series data for a single Fulcra metric.
Covers the time starting at start_time (inclusive) until end_time (exclusive). Result timestamps will include tz. Always translate timestamps to the user's local tz when this is known.
Args:
metric_name: The name of the time-series metric to retrieve. Use get_metrics_catalog
to find available metrics.
start_time: The starting time period (inclusive). Must include tz (ISO8601).
end_time: The ending time (exclusive). Must include tz (ISO8601).
sample_rate: Optional. The number of seconds per sample. Default is 60. Can be smaller than 1.
replace_nulls: Optional. When true, replace all NA with 0. Default is False.
calculations: Optional. A list of additional calculations to perform for each
time slice. Not supported on cumulative metrics. Options: "max", "min", "delta", "mean", "uniques", "allpoints", "rollingmean".
Returns:
A JSON string representing a list of data points for the metric.
For time ranges where data is missing, the values will be NA unless replace_nulls is true.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
calculations | No | ||
end_time | Yes | ||
metric_name | Yes | ||
replace_nulls | No | ||
sample_rate | No | ||
start_time | Yes |