latestOpenAPI 3.1.0Proprietary - UrbanFox2026-08-101443106.2 KB

e99fd9028c60

Metrics

Get tenant metrics

Retrieve tenant activity metrics for a selected date range.

get/v2/{tenant_slug}/metrics

Path parameters

tenant_slugstring required

Tenant DNS slug (lowercase letters, digits, and hyphens; 3-100 characters).

Example:demo-retail

Tenant DNS slug (lowercase letters, digits, and hyphens; 3-100 characters).

Query parameters

start_datestring date-time required

Inclusive start of the metrics query window (RFC 3339 / ISO 8601 UTC, milliseconds optional).

Example:2024-01-01T00:00:00Z

Inclusive start of the metrics query window (RFC 3339 / ISO 8601 UTC, milliseconds optional).

end_datestring date-time required

Exclusive end of the metrics query window (RFC 3339 / ISO 8601 UTC, milliseconds optional). Events at exactly end_date are not included; must be strictly greater than start_date.

Example:2024-01-31T23:59:59Z

Exclusive end of the metrics query window (RFC 3339 / ISO 8601 UTC, milliseconds optional). Events at exactly end_date are not included; must be strictly greater than start_date.

aggregation'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'

Time bucket size for the returned series. Omit to receive raw, non-aggregated data points. When set, the response includes a data point for every interval in [start_date, end_date) (half-open: start_date inclusive, end_date exclusive), filling missing intervals with zero values. Range limits: minute requires end_date - start_date <= 7 days; hour requires end_date - start_date <= 90 days; day, week, month, quarter, year have no explicit limit.

metric'timestamp' | 'total_events' | 'guest_sessions' | 'non_guest_sessions' | 'unique_sessions' | 'unique_ids' | 'session_starts'

Specific metric to return (timestamp, total_events, guest_sessions, non_guest_sessions, unique_sessions, unique_ids, session_starts). Omit to receive every metric for each data point.

Response

Successful Response

Example response

{
  "data": {
    "metrics": [
      {
        "guest_sessions": 450,
        "non_guest_sessions": 800,
        "session_starts": 1150,
        "timestamp": "2024-01-01T00:00:00Z",
        "total_events": 1250,
        "unique_ids": 980,
        "unique_sessions": 1200
      }
    ]
  }
}