Metrics

Query metrics (GET)

Changed on

Query one or more metrics via query parameters. The Metric API provides access to time series data for segments, streams, experiences, and other Lytics resources.

get/metric

Request

  • Base URL
    https://api.lytics.io/v2
  • URL
    https://api.lytics.io/v2/metric
  • Auth
    API key in header Authorization

Query parameters

account_idstring

The account ID. Defaults to the user's default account.

namestring

Friendly name to identify this metric request

dimension'"segment"' | '"experience"' | '"experiencegroup"' | '"stream"' | '"flow"' | '"flow_edge_traversed"' | '"inflight"' | '"works"' | '"auths"' | '"bandit"' | '"attribution"' | '"contentenrich"' | '"acct_quotas"' | '"segmovement"' | '"cooccurrent_counts"' | '"cloudconnect_connections"' | '"cloudconnect_tablesync"' | '"cloudconnect_segmentsync"' | '"e2e_profile_latency"' | '"e2e_trigger_latency"' | '"segmentmodel_summaries_ts"' | '"accountgoalcount"' | '"accountgoalvalue"' required

The dimension to query

dimension_idstring required

The ID of the specific resource within the dimension (e.g. segment ID)

dimension_typestring required

The metric type to retrieve (e.g. size, converted, conversionrate)

aggregation'"sum"' | '"max"' | '"min"' | '"diff"' | '"first"' | '"smooth"' required

Comma-separated aggregation methods to apply

start_datestring

Start of the query range. Supports friendly times (e.g. now-7d). Required if end_date is set; cannot be used with range.

end_datestring

End of the query range. Supports friendly times (e.g. now). Required if start_date is set.

rangestring

Time range from now (e.g. 7d for last 7 days). Cannot be used with start_date or end_date.

intervalstring

Bucket size for time series grouping (e.g. 1d, 2h). Defaults to 2h.

smoothboolean

Apply smoothing to the resulting metrics

round_datesboolean

Round start and end dates down to the nearest day

include_empty_rowsboolean

Include zero-value buckets in the response

include_sum_of_bucketsboolean

Include a sum of all bucket values in the response

refresh_cacheboolean

Bypass the cache and read fresh from the time-series store

Changes