Class: Anthropic::Models::Organization::AnalyticsPluginActivity
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Organization::AnalyticsPluginActivity
- Defined in:
- lib/anthropic/models/organization/analytics_plugin_activity.rb,
sig/anthropic/models/organization/analytics_plugin_activity.rbs
Instance Attribute Summary collapse
-
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Organization::AnalyticsPluginChatCoworkUnifiedMetrics?
Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on.
-
#claude_code_metrics ⇒ Anthropic::Models::Organization::AnalyticsPluginClaudeCodeMetrics
Claude Code activity metrics for a single plugin on a given day.
-
#cowork_metrics ⇒ Anthropic::Models::Organization::AnalyticsPluginCoworkMetrics
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) ⇒ AnalyticsPluginActivity
constructor
Per-plugin install + invocation activity for a given day.
- #to_hash ⇒ { claude_code_metrics: Anthropic::Organization::AnalyticsPluginClaudeCodeMetrics, cowork_metrics: Anthropic::Organization::AnalyticsPluginCoworkMetrics, distinct_user_count: Integer, install_count: Integer?, invocation_count: Integer, plugin_id: String?, plugin_name: String, chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsPluginChatCoworkUnifiedMetrics?, 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) ⇒ AnalyticsPluginActivity
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::Organization::AnalyticsPluginActivity for more details.
|
|
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 104
|
Instance Attribute Details
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Organization::AnalyticsPluginChatCoworkUnifiedMetrics?
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.
63 64 65 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 63 optional :chat_cowork_unified_metrics, -> { Anthropic::Organization::AnalyticsPluginChatCoworkUnifiedMetrics }, nil?: true |
#claude_code_metrics ⇒ Anthropic::Models::Organization::AnalyticsPluginClaudeCodeMetrics
Claude Code activity metrics for a single plugin on a given day.
11 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 11 required :claude_code_metrics, -> { Anthropic::Organization::AnalyticsPluginClaudeCodeMetrics } |
#cowork_metrics ⇒ Anthropic::Models::Organization::AnalyticsPluginCoworkMetrics
Cowork activity metrics for a single plugin on a given day.
17 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 17 required :cowork_metrics, -> { Anthropic::Organization::AnalyticsPluginCoworkMetrics } |
#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.
26 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 26 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.
34 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 34 required :install_count, Integer, nil?: true |
#invocation_count ⇒ Integer
Number of plugin invocations on the requested day
40 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 40 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.
48 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 48 required :plugin_id, String, nil?: true |
#plugin_name ⇒ String
Name of the plugin
54 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 54 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.
80 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 80 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.
87 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 87 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.
95 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 95 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.
102 |
# File 'lib/anthropic/models/organization/analytics_plugin_activity.rb', line 102 optional :user_id, String, nil?: true |
Instance Method Details
#to_hash ⇒ { claude_code_metrics: Anthropic::Organization::AnalyticsPluginClaudeCodeMetrics, cowork_metrics: Anthropic::Organization::AnalyticsPluginCoworkMetrics, distinct_user_count: Integer, install_count: Integer?, invocation_count: Integer, plugin_id: String?, plugin_name: String, chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsPluginChatCoworkUnifiedMetrics?, product: String?, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'sig/anthropic/models/organization/analytics_plugin_activity.rbs', line 60
def to_hash: -> {
claude_code_metrics: Anthropic::Organization::AnalyticsPluginClaudeCodeMetrics,
cowork_metrics: Anthropic::Organization::AnalyticsPluginCoworkMetrics,
distinct_user_count: Integer,
install_count: Integer?,
invocation_count: Integer,
plugin_id: String?,
plugin_name: String,
chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsPluginChatCoworkUnifiedMetrics?,
product: String?,
rbac_group_id: String?,
rbac_group_name: String?,
user_id: String?
}
|