Skip to main content

Constructor

Parameters

Returns

MetricsClient

Methods

getActiveUsersMetrics()

Get unique active users for a custom date range. A user is considered active if they have created at least min_sessions sessions OR at least min_searches searches within the specified time range. Returns a single count of unique active users across the entire range.

Parameters

Request-specific configuration.

Returns

ActiveUserMetricsResponse

getDauMetrics()

Get daily active users for each day in the specified time range. A user is considered active on a given day if they have created at least min_sessions sessions OR at least min_searches searches during that UTC day. Returns a list of daily active user counts, one entry per day in the range.

Parameters

Request-specific configuration.

Returns

ActiveUserMetricsListResponse

getMauMetrics()

Get monthly active users for each month in the specified time range. A user is considered active in a given month if they have created at least min_sessions sessions OR at least min_searches searches during that UTC month. Returns a list of monthly active user counts, one entry per month in the range.

Parameters

Request-specific configuration.

Returns

ActiveUserMetricsListResponse

getOrganizationUsageMetrics()

Get aggregated usage metrics for the enterprise account. Returns counts of sessions, searches, and PRs (opened, closed, merged) within the specified time range.

Parameters

Request-specific configuration.

Returns

UsageMetrics

getPrMetrics()

Get aggregated PR metrics for the enterprise account. Optionally filter by playbook_id to get metrics for PRs from sessions created with a specific playbook.

Parameters

Request-specific configuration.

Returns

PrMetricsResponse

getSearchMetrics()

Get aggregated search metrics for the enterprise account.

Parameters

Request-specific configuration.

Returns

SearchMetricsResponse

getSessionMetrics()

Get aggregated session metrics for the enterprise account. Optionally filter by playbook_id to get metrics for sessions created with a specific playbook.

Parameters

Request-specific configuration.

Returns

SessionMetricsResponse

getSessionsByCategory()

Get session counts and ACU consumption grouped by category and subcategory.

Parameters

Request-specific configuration.

Returns

SessionsByCategoryResponse

getUsageMetrics()

Get aggregated usage metrics for the enterprise account. Returns counts of sessions, searches, and PRs (opened, closed, merged) within the specified time range.

Parameters

Request-specific configuration.

Returns

UsageMetrics

getWauMetrics()

Get weekly active users for each week in the specified time range. A user is considered active in a given week if they have created at least min_sessions sessions OR at least min_searches searches during that UTC week. Weeks are defined as Monday 00:00:00 UTC to Sunday 23:59:59 UTC. Returns a list of weekly active user counts, one entry per week in the range.

Parameters

Request-specific configuration.

Returns

ActiveUserMetricsListResponse