Class: Anthropic::Models::Beta::Organization::BetaAnalyticsPluginActivity
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::BetaAnalyticsPluginActivity
- Defined in:
- lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb,
sig/anthropic/models/beta/organization/beta_analytics_plugin_activity.rbs
Instance Attribute Summary collapse
-
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsPluginChatCoworkUnifiedMetrics?
Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on.
-
#claude_code_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsPluginClaudeCodeMetrics
Claude Code activity metrics for a single plugin on a given day.
-
#cowork_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsPluginCoworkMetrics
Cowork activity metrics for a single plugin on a given day.
-
#distinct_user_count ⇒ Integer
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.
-
#install_count ⇒ Integer?
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.
-
#invocation_count ⇒ Integer
Number of plugin invocations on the requested day.
-
#plugin_id ⇒ String?
Stable plugin identifier when available (e.g.
serena@claude-plugins-official). -
#plugin_name ⇒ String
Name of the plugin.
-
#product ⇒ String?
Product that produced this row's activity: one of
chat,claude_code,cowork,office_agent, orchat_cowork_unified(Chat and Cowork unified). -
#rbac_group_id ⇒ String?
Tagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. -
#rbac_group_name ⇒ String?
Resolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. -
#user_id ⇒ String?
Tagged user identifier (e.g.
user_...).
Instance Method Summary collapse
-
#initialize(claude_code_metrics:, cowork_metrics:, distinct_user_count:, install_count:, invocation_count:, plugin_id:, plugin_name:, chat_cowork_unified_metrics: nil, product: nil, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ BetaAnalyticsPluginActivity
constructor
Per-plugin install + invocation activity for a given day.
- #to_hash ⇒ { claude_code_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginClaudeCodeMetrics, cowork_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginCoworkMetrics, distinct_user_count: Integer, install_count: Integer?, invocation_count: Integer, plugin_id: String?, plugin_name: String, chat_cowork_unified_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginChatCoworkUnifiedMetrics?, product: String?, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(claude_code_metrics:, cowork_metrics:, distinct_user_count:, install_count:, invocation_count:, plugin_id:, plugin_name:, chat_cowork_unified_metrics: nil, product: nil, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ 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.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaAnalyticsPluginActivity for more details.
|
|
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 105
|
Instance Attribute Details
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsPluginChatCoworkUnifiedMetrics?
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.
64 65 66 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 64 optional :chat_cowork_unified_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsPluginChatCoworkUnifiedMetrics }, nil?: true |
#claude_code_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsPluginClaudeCodeMetrics
Claude Code activity metrics for a single plugin on a given day.
12 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 12 required :claude_code_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsPluginClaudeCodeMetrics } |
#cowork_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsPluginCoworkMetrics
Cowork activity metrics for a single plugin on a given day.
18 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 18 required :cowork_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsPluginCoworkMetrics } |
#distinct_user_count ⇒ Integer
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.
27 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 27 required :distinct_user_count, Integer |
#install_count ⇒ Integer?
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.
35 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 35 required :install_count, Integer, nil?: true |
#invocation_count ⇒ Integer
Number of plugin invocations on the requested day
41 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 41 required :invocation_count, Integer |
#plugin_id ⇒ String?
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.
49 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 49 required :plugin_id, String, nil?: true |
#plugin_name ⇒ String
Name of the plugin
55 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 55 required :plugin_name, String |
#product ⇒ String?
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.
81 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 81 optional :product, String, nil?: true |
#rbac_group_id ⇒ String?
Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API
spelling. Present only when the request grouped by rbac_group_id.
88 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 88 optional :rbac_group_id, String, nil?: true |
#rbac_group_name ⇒ String?
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.
96 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 96 optional :rbac_group_name, String, nil?: true |
#user_id ⇒ String?
Tagged user identifier (e.g. user_...). Present only when the request grouped
by user_id.
103 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_plugin_activity.rb', line 103 optional :user_id, String, nil?: true |
Instance Method Details
#to_hash ⇒ { claude_code_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginClaudeCodeMetrics, cowork_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginCoworkMetrics, distinct_user_count: Integer, install_count: Integer?, invocation_count: Integer, plugin_id: String?, plugin_name: String, chat_cowork_unified_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginChatCoworkUnifiedMetrics?, product: String?, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'sig/anthropic/models/beta/organization/beta_analytics_plugin_activity.rbs', line 61
def to_hash: -> {
claude_code_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginClaudeCodeMetrics,
cowork_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginCoworkMetrics,
distinct_user_count: Integer,
install_count: Integer?,
invocation_count: Integer,
plugin_id: String?,
plugin_name: String,
chat_cowork_unified_metrics: Anthropic::Beta::Organization::BetaAnalyticsPluginChatCoworkUnifiedMetrics?,
product: String?,
rbac_group_id: String?,
rbac_group_name: String?,
user_id: String?
}
|