Class: Anthropic::Models::Organization::AnalyticsUserActivity
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Organization::AnalyticsUserActivity
- Defined in:
- lib/anthropic/models/organization/analytics_user_activity.rb,
sig/anthropic/models/organization/analytics_user_activity.rbs
Instance Attribute Summary collapse
-
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Organization::AnalyticsChatCoworkUnifiedMetrics?
Activity recorded while the member had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into
chat(chat activity) andsessions(Cowork activity). -
#chat_metrics ⇒ Anthropic::Models::Organization::AnalyticsChatMetrics
Claude.ai activity metrics for a single user on a given day.
-
#claude_code_metrics ⇒ Anthropic::Models::Organization::AnalyticsClaudeCodeMetrics
Claude Code activity metrics for a single user on a given day.
-
#claude_tag_metrics ⇒ Anthropic::Models::Organization::AnalyticsClaudeTagMetrics?
Claude Tag activity in Slack by a user who has linked a Claude account.
-
#cowork_metrics ⇒ Anthropic::Models::Organization::AnalyticsCoworkMetrics
Cowork activity metrics for a single user on a given day.
-
#design_metrics ⇒ Anthropic::Models::Organization::AnalyticsDesignMetrics
Claude Design activity metrics for a single user on a given day.
-
#distinct_user_count ⇒ Integer?
Number of distinct active users represented by this row.
-
#last_activity_date ⇒ Date?
Most recent UTC day (YYYY-MM-DD) on which the user had any counted activity, within the requested window: equal to the requested
datein single-day mode, and to the latest active day fromstarting_date(inclusive) toending_date(exclusive) in date-range rollup mode — never a day earlier than the window start. -
#office_metrics ⇒ Anthropic::Models::Organization::AnalyticsOfficeMetrics
Office Agent activity metrics for a single user on a given day, broken out by Office product.
-
#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. -
#science_metrics ⇒ Anthropic::Models::Organization::AnalyticsScienceMetrics
Claude Science activity metrics for a single user on a given day.
-
#user ⇒ Anthropic::Models::Organization::AnalyticsUser?
The user this row describes.
-
#web_search_count ⇒ Integer
Number of web searches performed.
Instance Method Summary collapse
-
#initialize(chat_metrics:, claude_code_metrics:, cowork_metrics:, design_metrics:, distinct_user_count:, office_metrics:, science_metrics:, user:, web_search_count:, chat_cowork_unified_metrics: nil, claude_tag_metrics: nil, last_activity_date: nil, rbac_group_id: nil, rbac_group_name: nil) ⇒ AnalyticsUserActivity
constructor
Per-user activity data for a given day.
- #to_hash ⇒ { chat_metrics: Anthropic::Organization::AnalyticsChatMetrics, claude_code_metrics: Anthropic::Organization::AnalyticsClaudeCodeMetrics, cowork_metrics: Anthropic::Organization::AnalyticsCoworkMetrics, design_metrics: Anthropic::Organization::AnalyticsDesignMetrics, distinct_user_count: Integer?, office_metrics: Anthropic::Organization::AnalyticsOfficeMetrics, science_metrics: Anthropic::Organization::AnalyticsScienceMetrics, user: Anthropic::Organization::AnalyticsUser?, web_search_count: Integer, chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsChatCoworkUnifiedMetrics?, claude_tag_metrics: Anthropic::Organization::AnalyticsClaudeTagMetrics?, last_activity_date: Date?, rbac_group_id: String?, rbac_group_name: 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(chat_metrics:, claude_code_metrics:, cowork_metrics:, design_metrics:, distinct_user_count:, office_metrics:, science_metrics:, user:, web_search_count:, chat_cowork_unified_metrics: nil, claude_tag_metrics: nil, last_activity_date: nil, rbac_group_id: nil, rbac_group_name: nil) ⇒ AnalyticsUserActivity
Per-user activity data for a given day.
Some parameter documentations has been truncated, see Anthropic::Models::Organization::AnalyticsUserActivity for more details.
|
|
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 115
|
Instance Attribute Details
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Organization::AnalyticsChatCoworkUnifiedMetrics?
Activity recorded while the member had Chat and Cowork unified (Cowork's
features inside claude.ai chat) turned on, split into chat (chat activity) and
sessions (Cowork activity). Omitted from the response where Chat and Cowork
unified is not available.
72 73 74 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 72 optional :chat_cowork_unified_metrics, -> { Anthropic::Organization::AnalyticsChatCoworkUnifiedMetrics }, nil?: true |
#chat_metrics ⇒ Anthropic::Models::Organization::AnalyticsChatMetrics
Claude.ai activity metrics for a single user on a given day.
11 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 11 required :chat_metrics, -> { Anthropic::Organization::AnalyticsChatMetrics } |
#claude_code_metrics ⇒ Anthropic::Models::Organization::AnalyticsClaudeCodeMetrics
Claude Code activity metrics for a single user on a given day.
17 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 17 required :claude_code_metrics, -> { Anthropic::Organization::AnalyticsClaudeCodeMetrics } |
#claude_tag_metrics ⇒ Anthropic::Models::Organization::AnalyticsClaudeTagMetrics?
Claude Tag activity in Slack by a user who has linked a Claude account. Activity
by Slack users who have not linked an account appears only in the /summaries
Claude Tag counts, so these rows do not add up to those counts. Omitted from the
response on deployments that do not offer Claude Tag reporting.
83 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 83 optional :claude_tag_metrics, -> { Anthropic::Organization::AnalyticsClaudeTagMetrics }, nil?: true |
#cowork_metrics ⇒ Anthropic::Models::Organization::AnalyticsCoworkMetrics
Cowork activity metrics for a single user on a given day.
23 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 23 required :cowork_metrics, -> { Anthropic::Organization::AnalyticsCoworkMetrics } |
#design_metrics ⇒ Anthropic::Models::Organization::AnalyticsDesignMetrics
Claude Design activity metrics for a single user on a given day.
29 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 29 required :design_metrics, -> { Anthropic::Organization::AnalyticsDesignMetrics } |
#distinct_user_count ⇒ Integer?
Number of distinct active users represented by this row. Only set for grouped
rollups (group_by[]); null for per-user rows. In date-range mode, recomputed
as an exact distinct count of the group's active members over the requested
window, never a sum of per-day values.
38 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 38 required :distinct_user_count, Integer, nil?: true |
#last_activity_date ⇒ Date?
Most recent UTC day (YYYY-MM-DD) on which the user had any counted activity,
within the requested window: equal to the requested date in single-day mode,
and to the latest active day from starting_date (inclusive) to ending_date
(exclusive) in date-range rollup mode — never a day earlier than the window
start. On filtered requests (filter[]) only days matching the filter count:
with filter[]=rbac_group_id:{id} it is the last day the user was active while
a member of that group, consistent with the row's other metrics. On grouped
(group_by[]) rows it is the latest day any member of the group was active (the
requested date in single-day mode). Omitted from the response while
last-activity reporting is not enabled for this organization.
98 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 98 optional :last_activity_date, Date, nil?: true |
#office_metrics ⇒ Anthropic::Models::Organization::AnalyticsOfficeMetrics
Office Agent activity metrics for a single user on a given day, broken out by Office product.
45 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 45 required :office_metrics, -> { Anthropic::Organization::AnalyticsOfficeMetrics } |
#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.
105 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 105 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.
113 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 113 optional :rbac_group_name, String, nil?: true |
#science_metrics ⇒ Anthropic::Models::Organization::AnalyticsScienceMetrics
Claude Science activity metrics for a single user on a given day.
51 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 51 required :science_metrics, -> { Anthropic::Organization::AnalyticsScienceMetrics } |
#user ⇒ Anthropic::Models::Organization::AnalyticsUser?
The user this row describes. Null on rows aggregated across users.
57 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 57 required :user, -> { Anthropic::Organization::AnalyticsUser }, nil?: true |
#web_search_count ⇒ Integer
Number of web searches performed
63 |
# File 'lib/anthropic/models/organization/analytics_user_activity.rb', line 63 required :web_search_count, Integer |
Instance Method Details
#to_hash ⇒ { chat_metrics: Anthropic::Organization::AnalyticsChatMetrics, claude_code_metrics: Anthropic::Organization::AnalyticsClaudeCodeMetrics, cowork_metrics: Anthropic::Organization::AnalyticsCoworkMetrics, design_metrics: Anthropic::Organization::AnalyticsDesignMetrics, distinct_user_count: Integer?, office_metrics: Anthropic::Organization::AnalyticsOfficeMetrics, science_metrics: Anthropic::Organization::AnalyticsScienceMetrics, user: Anthropic::Organization::AnalyticsUser?, web_search_count: Integer, chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsChatCoworkUnifiedMetrics?, claude_tag_metrics: Anthropic::Organization::AnalyticsClaudeTagMetrics?, last_activity_date: Date?, rbac_group_id: String?, rbac_group_name: String? }
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'sig/anthropic/models/organization/analytics_user_activity.rbs', line 68
def to_hash: -> {
chat_metrics: Anthropic::Organization::AnalyticsChatMetrics,
claude_code_metrics: Anthropic::Organization::AnalyticsClaudeCodeMetrics,
cowork_metrics: Anthropic::Organization::AnalyticsCoworkMetrics,
design_metrics: Anthropic::Organization::AnalyticsDesignMetrics,
distinct_user_count: Integer?,
office_metrics: Anthropic::Organization::AnalyticsOfficeMetrics,
science_metrics: Anthropic::Organization::AnalyticsScienceMetrics,
user: Anthropic::Organization::AnalyticsUser?,
web_search_count: Integer,
chat_cowork_unified_metrics: Anthropic::Organization::AnalyticsChatCoworkUnifiedMetrics?,
claude_tag_metrics: Anthropic::Organization::AnalyticsClaudeTagMetrics?,
last_activity_date: Date?,
rbac_group_id: String?,
rbac_group_name: String?
}
|