Class BetaAnalyticsPluginActivity
-
- All Implemented Interfaces:
public final class BetaAnalyticsPluginActivityPer-plugin install + invocation activity for a given day.
With
group_by[]=user_id/rbac_group_id/product(cowork,claude_codeandchat_cowork_unifiedonly on this endpoint) each row is one (plugin, user), (plugin, group), or (plugin, product) cut: the flatuser_id/rbac_group_id/productkeys carry the cut and the counts are scoped to it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaAnalyticsPluginActivity.BuilderA builder for BetaAnalyticsPluginActivity.
-
Method Summary
Modifier and Type Method Description final BetaAnalyticsPluginClaudeCodeMetricsclaudeCodeMetrics()Claude Code activity metrics for a single plugin on a given day. final BetaAnalyticsPluginCoworkMetricscoworkMetrics()Cowork activity metrics for a single plugin on a given day. final LongdistinctUserCount()Number of distinct users with recorded install or invocation activity for the plugin on the requested day (install-only users count), or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values. final Optional<Long>installCount()Number of distinct users who installed the plugin on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values. final LonginvocationCount()Number of plugin invocations on the requested day final Optional<String>pluginId()Stable plugin identifier when available (e.g. final StringpluginName()Name of the plugin final Optional<BetaAnalyticsPluginChatCoworkUnifiedMetrics>chatCoworkUnifiedMetrics()Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on. final Optional<String>product()Product that produced this row's activity: one of chat,claude_code,cowork,office_agent, orchat_cowork_unified(Chat and Cowork unified).final Optional<String>rbacGroupId()Tagged RBAC group identifier ( rbac_group_...), matching the spend-limits API spelling.final Optional<String>rbacGroupName()Resolved RBAC group display name, alongside rbac_group_idwhen name resolution is available.final Optional<String>userId()Tagged user identifier (e.g. final JsonField<BetaAnalyticsPluginClaudeCodeMetrics>_claudeCodeMetrics()Returns the raw JSON value of claudeCodeMetrics. final JsonField<BetaAnalyticsPluginCoworkMetrics>_coworkMetrics()Returns the raw JSON value of coworkMetrics. final JsonField<Long>_distinctUserCount()Returns the raw JSON value of distinctUserCount. final JsonField<Long>_installCount()Returns the raw JSON value of installCount. final JsonField<Long>_invocationCount()Returns the raw JSON value of invocationCount. final JsonField<String>_pluginId()Returns the raw JSON value of pluginId. final JsonField<String>_pluginName()Returns the raw JSON value of pluginName. final JsonField<BetaAnalyticsPluginChatCoworkUnifiedMetrics>_chatCoworkUnifiedMetrics()Returns the raw JSON value of chatCoworkUnifiedMetrics. final JsonField<String>_product()Returns the raw JSON value of product. final JsonField<String>_rbacGroupId()Returns the raw JSON value of rbacGroupId. final JsonField<String>_rbacGroupName()Returns the raw JSON value of rbacGroupName. final JsonField<String>_userId()Returns the raw JSON value of userId. final Map<String, JsonValue>_additionalProperties()final BetaAnalyticsPluginActivity.BuildertoBuilder()final BetaAnalyticsPluginActivityvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaAnalyticsPluginActivity.Builderbuilder()Returns a mutable builder for constructing an instance of BetaAnalyticsPluginActivity. -
-
Method Detail
-
claudeCodeMetrics
final BetaAnalyticsPluginClaudeCodeMetrics claudeCodeMetrics()
Claude Code activity metrics for a single plugin on a given day.
-
coworkMetrics
final BetaAnalyticsPluginCoworkMetrics coworkMetrics()
Cowork activity metrics for a single plugin on a given day.
-
distinctUserCount
final Long distinctUserCount()
Number of distinct users with recorded install or invocation activity for the plugin on the requested day (install-only users count), or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
-
installCount
final Optional<Long> installCount()
Number of distinct users who installed the plugin on the requested day, or, in date-range mode, over the requested window — recomputed as an exact distinct count over the window's per-member daily rows, never a sum of per-day values.
-
invocationCount
final Long invocationCount()
Number of plugin invocations on the requested day
-
pluginId
final Optional<String> pluginId()
Stable plugin identifier when available (e.g.
serena@claude-plugins-official). Null for third-party Claude Code plugins (redacted at the source) and Cowork slash commands that carry only a hashed id.
-
pluginName
final String pluginName()
Name of the plugin
-
chatCoworkUnifiedMetrics
final Optional<BetaAnalyticsPluginChatCoworkUnifiedMetrics> chatCoworkUnifiedMetrics()
Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
-
product
final Optional<String> product()
Product that produced this row's activity: one of
chat,claude_code,cowork,office_agent, orchat_cowork_unified(Chat and Cowork unified). These are the canonical Cost & Usage product names; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics. On/pluginsonlycowork,claude_codeandchat_cowork_unifiedoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code,coworkandchat_cowork_unifiedoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct.
-
rbacGroupId
final Optional<String> rbacGroupId()
Tagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id.
-
rbacGroupName
final Optional<String> rbacGroupName()
Resolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key.
-
userId
final Optional<String> userId()
Tagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id.
-
_claudeCodeMetrics
final JsonField<BetaAnalyticsPluginClaudeCodeMetrics> _claudeCodeMetrics()
Returns the raw JSON value of claudeCodeMetrics.
Unlike claudeCodeMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_coworkMetrics
final JsonField<BetaAnalyticsPluginCoworkMetrics> _coworkMetrics()
Returns the raw JSON value of coworkMetrics.
Unlike coworkMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_distinctUserCount
final JsonField<Long> _distinctUserCount()
Returns the raw JSON value of distinctUserCount.
Unlike distinctUserCount, this method doesn't throw if the JSON field has an unexpected type.
-
_installCount
final JsonField<Long> _installCount()
Returns the raw JSON value of installCount.
Unlike installCount, this method doesn't throw if the JSON field has an unexpected type.
-
_invocationCount
final JsonField<Long> _invocationCount()
Returns the raw JSON value of invocationCount.
Unlike invocationCount, this method doesn't throw if the JSON field has an unexpected type.
-
_pluginId
final JsonField<String> _pluginId()
Returns the raw JSON value of pluginId.
Unlike pluginId, this method doesn't throw if the JSON field has an unexpected type.
-
_pluginName
final JsonField<String> _pluginName()
Returns the raw JSON value of pluginName.
Unlike pluginName, this method doesn't throw if the JSON field has an unexpected type.
-
_chatCoworkUnifiedMetrics
final JsonField<BetaAnalyticsPluginChatCoworkUnifiedMetrics> _chatCoworkUnifiedMetrics()
Returns the raw JSON value of chatCoworkUnifiedMetrics.
Unlike chatCoworkUnifiedMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_product
final JsonField<String> _product()
Returns the raw JSON value of product.
Unlike product, this method doesn't throw if the JSON field has an unexpected type.
-
_rbacGroupId
final JsonField<String> _rbacGroupId()
Returns the raw JSON value of rbacGroupId.
Unlike rbacGroupId, this method doesn't throw if the JSON field has an unexpected type.
-
_rbacGroupName
final JsonField<String> _rbacGroupName()
Returns the raw JSON value of rbacGroupName.
Unlike rbacGroupName, this method doesn't throw if the JSON field has an unexpected type.
-
_userId
final JsonField<String> _userId()
Returns the raw JSON value of userId.
Unlike userId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaAnalyticsPluginActivity.Builder toBuilder()
-
validate
final BetaAnalyticsPluginActivity validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaAnalyticsPluginActivity.Builder builder()
Returns a mutable builder for constructing an instance of BetaAnalyticsPluginActivity.
The following fields are required:
.claudeCodeMetrics() .coworkMetrics() .distinctUserCount() .installCount() .invocationCount() .pluginId() .pluginName()
-
-
-
-