Query metrics (GET)
Changed onQuery one or more metrics via query parameters. The Metric API provides access to time series data for segments, streams, experiences, and other Lytics resources.
Request
- Base URLhttps://api.lytics.io/v2
- URLhttps://api.lytics.io/v2/metric
- AuthAPI key in header Authorization
Query parameters
The account ID. Defaults to the user's default account.
Friendly name to identify this metric request
The dimension to query
The ID of the specific resource within the dimension (e.g. segment ID)
The metric type to retrieve (e.g. size, converted, conversionrate)
Comma-separated aggregation methods to apply
Start of the query range. Supports friendly times (e.g. now-7d). Required if end_date is set; cannot be used with range.
End of the query range. Supports friendly times (e.g. now). Required if start_date is set.
Time range from now (e.g. 7d for last 7 days). Cannot be used with start_date or end_date.
Bucket size for time series grouping (e.g. 1d, 2h). Defaults to 2h.
Apply smoothing to the resulting metrics
Round start and end dates down to the nearest day
Include zero-value buckets in the response
Include a sum of all bucket values in the response
Bypass the cache and read fresh from the time-series store
Changes
- info
endpoint added
- info