This page lists the metrics, top-metric categories, and supported periods for the PubNub Insights API. The Insights API requires Insights Premium. The API returns all metrics in UTC.
The Insights API is part of the Admin API. The Admin API reference covers the request details: authentication with an Admin API key, endpoints, parameters, and response codes. Use this page to choose the metric names, category, and period you pass in a request.
Messages per country in the selected period. Includes timestamps.
top_10_message_types
Top 10 message types for the selected period. Requires a JSON path in Messages Configuration if your payloads do not follow PubNub's message type conventions.
The channel_patterns metric groups channels by name pattern. The filters, orderBy, and limit parameters of GET /v2/insights apply to channel_patterns results.
filters supports the operators eq, neq, gt, lt, gte, lte, in, nin, startsWith, endsWith, and contains.
orderBy supports the fields timestamp_value, count_messages, count_users, count_subscribers, and count_users_with_messages.
limit sets the number of channel_patterns records returned.
These metrics go in the metric[] parameter of GET /v2/insights/top. Each request also needs a category. The filters parameter narrows results to specific channels or users and supports the operators eq, neq, gt, lt, gte, lte, in, nin, and startsWith.
Metric
Description
top_20_channels
Top 20 channels for the selected period and category
top_1000_channels
Top 1000 channels for the selected period and category
top_20_users
Top 20 users for the selected period and category
top_1000_users
Top 1000 users for the selected period and category
top_20_channels_with_user_duration
Top 20 channels with average user duration and user counts by duration bucket
top_1000_channels_with_user_duration
Top 1000 channels with average user duration and user counts by duration bucket