Class BetaAnalyticsPluginActivity

  • All Implemented Interfaces:

    
    public final class BetaAnalyticsPluginActivity
    
                        

    Per-plugin install + invocation activity for a given day.

    With group_by[]=user_id / rbac_group_id / product (cowork, claude_code and chat_cowork_unified only on this endpoint) each row is one (plugin, user), (plugin, group), or (plugin, product) cut: the flat user_id / rbac_group_id / product keys carry the cut and the counts are scoped to it.

    • Constructor Detail

    • Method Detail

      • 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.

      • product

         final Optional<String> product()

        Product that produced this row's activity: one of chat, claude_code, cowork, office_agent, or chat_cowork_unified (Chat and Cowork unified). These are the canonical Cost & Usage product names; an office_agent row's per-surface breakdown is in its office_metrics. On /plugins only cowork, claude_code and chat_cowork_unified occur (the only surfaces with plugin attribution); on /artifacts only chat, claude_code, cowork and chat_cowork_unified occur (the surfaces that create artifacts); /apps/chat/projects does not support the product dimension (a product entry in group_by[] or filter[] there is rejected). Present only when the request grouped by product.

      • rbacGroupId

         final Optional<String> rbacGroupId()

        Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped by rbac_group_id.

      • rbacGroupName

         final Optional<String> rbacGroupName()

        Resolved RBAC group display name, alongside rbac_group_id when name resolution is available. Null if the group has been deleted or its name could not be resolved; rbac_group_id remains the stable key.

      • userId

         final Optional<String> userId()

        Tagged user identifier (e.g. user_...). Present only when the request grouped by user_id.

      • _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.

      • _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.

      • 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.