Analytics

Get an engagement metric

GET/analytics/engagement/{id}

Returns engagement as a series of {key, value} buckets; each slug is described under metric.

popular-days and popular-times count live deal and transaction events on the deals GET /deals lists for you; none in filter[occurred_at] means all time. logins-per-day and logins-per-hour count logins by your organisation's users in zero-filled UTC buckets, and answer 404 when the token's organisation no longer exists. Figures come from the analytics store, which trails live data. An unknown metric is a 404. It only reads.

Path parameters

  • idstringRequired#

    How to group events. Each value is described under x-enum-descriptions.

    One of: popular-days, popular-times, logins-per-day, logins-per-hour

Query parameters

  • filter[occurred_at]string (date-time)#

    Only events in a range, written filter[occurred_at][gte]=2026-10-01. Takes gt, gte, lt and lte. With none, popular-days and popular-times count all events. On the login series it sets the window of buckets, and more than 366 buckets is 422 validation_failed on filter.occurred_at.

Responses

200

The metric.

AnalyticsMetric
{
  "data": {
    "metric": "popular-days",
    "category": "engagement",
    "filter": {
      "occurred_at": {
        "gte": "2026-05-01T00:00:00Z",
        "lte": "2026-05-31T23:59:59Z"
      }
    },
    "series": [
      {
        "key": 1,
        "value": 512
      },
      {
        "key": 2,
        "value": 738
      },
      {
        "key": 3,
        "value": 690
      },
      {
        "key": 4,
        "value": 803
      },
      {
        "key": 5,
        "value": 421
      },
      {
        "key": 6,
        "value": 96
      },
      {
        "key": 0,
        "value": 74
      }
    ]
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl https://your-org-domain/kong/core/api/v2/analytics/engagement/{id}\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"