Class: Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorActivity
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorActivity
- Defined in:
- lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb,
sig/anthropic/models/beta/organization/beta_analytics_connector_activity.rbs
Instance Attribute Summary collapse
-
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorChatCoworkUnifiedMetrics?
Connector use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions.
-
#chat_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorChatMetrics
Claude.ai activity metrics for a single connector on a given day.
-
#claude_code_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorClaudeCodeMetrics
Claude Code activity metrics for a single connector on a given day.
-
#connector_display_name ⇒ String?
Human-readable display name for rows whose
connector_nameis an opaque connector id rather than a readable name, resolved at request time from the organization's connectors (including connectors that have since been removed). -
#connector_name ⇒ String
Name of the connector.
-
#cowork_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorCoworkMetrics
Cowork activity metrics for a single connector on a given day.
-
#distinct_user_count ⇒ Integer
Number of distinct users who used the connector 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.
-
#individual_auth_distinct_user_count ⇒ Integer?
Number of distinct users whose use of this connector on the requested day ran on their own individual credential, connected through their own consent flow.
-
#managed_auth_distinct_user_count ⇒ Integer?
Number of distinct users whose use of this connector on the requested day ran on Enterprise Managed Auth (an organization-managed credential provisioned through the organization's identity provider), read from the token record each request used.
-
#office_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorOfficeMetrics
Office Agent activity metrics for a single connector on a given day, broken out by Office product.
-
#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. -
#read_call_count ⇒ Integer?
Number of connector tool calls on the requested day whose trusted read-only annotation marked them read-only.
-
#unclassified_call_count ⇒ Integer?
Number of connector tool calls on the requested day with no trusted read-only annotation — the annotation is optional in the MCP spec and is discarded when connector access controls are active, so unclassified calls are common.
-
#user_id ⇒ String?
Tagged user identifier (e.g.
user_...). -
#write_call_count ⇒ Integer?
Number of connector tool calls on the requested day whose trusted read-only annotation marked them not read-only.
Instance Method Summary collapse
-
#initialize(chat_metrics:, claude_code_metrics:, connector_display_name:, connector_name:, cowork_metrics:, distinct_user_count:, individual_auth_distinct_user_count:, managed_auth_distinct_user_count:, office_metrics:, read_call_count:, unclassified_call_count:, write_call_count:, chat_cowork_unified_metrics: nil, product: nil, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ BetaAnalyticsConnectorActivity
constructor
Per-connector activity data for a given day.
- #to_hash ⇒ { chat_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorChatMetrics, claude_code_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorClaudeCodeMetrics, connector_display_name: String?, connector_name: String, cowork_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorCoworkMetrics, distinct_user_count: Integer, individual_auth_distinct_user_count: Integer?, managed_auth_distinct_user_count: Integer?, office_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorOfficeMetrics, read_call_count: Integer?, unclassified_call_count: Integer?, write_call_count: Integer?, chat_cowork_unified_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorChatCoworkUnifiedMetrics?, 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(chat_metrics:, claude_code_metrics:, connector_display_name:, connector_name:, cowork_metrics:, distinct_user_count:, individual_auth_distinct_user_count:, managed_auth_distinct_user_count:, office_metrics:, read_call_count:, unclassified_call_count:, write_call_count:, chat_cowork_unified_metrics: nil, product: nil, rbac_group_id: nil, rbac_group_name: nil, user_id: nil) ⇒ BetaAnalyticsConnectorActivity
Per-connector activity data for a given day.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorActivity for more details.
|
|
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 187
|
Instance Attribute Details
#chat_cowork_unified_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorChatCoworkUnifiedMetrics?
Connector use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. 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.
146 147 148 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 146 optional :chat_cowork_unified_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsConnectorChatCoworkUnifiedMetrics }, nil?: true |
#chat_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorChatMetrics
Claude.ai activity metrics for a single connector on a given day.
12 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 12 required :chat_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsConnectorChatMetrics } |
#claude_code_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorClaudeCodeMetrics
Claude Code activity metrics for a single connector on a given day.
18 19 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 18 required :claude_code_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsConnectorClaudeCodeMetrics } |
#connector_display_name ⇒ String?
Human-readable display name for rows whose connector_name is an opaque
connector id rather than a readable name, resolved at request time from the
organization's connectors (including connectors that have since been removed).
connector_name remains the row's stable key for sorting and pagination, and
filter[]=connector_name:{value} also matches these rows by display name.
Display names are not unique, and the same connector's claude.ai usage can
appear under a separate row with a readable connector_name. Null when
connector_name is already a readable name, when the id cannot be resolved to
one of the organization's connectors, or when display-name resolution is not
enabled for this organization.
34 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 34 required :connector_display_name, String, nil?: true |
#connector_name ⇒ String
Name of the connector. Some rows carry an opaque connector id here instead of a
readable name; connector_display_name holds the resolved name for those rows.
41 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 41 required :connector_name, String |
#cowork_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorCoworkMetrics
Cowork activity metrics for a single connector on a given day.
47 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 47 required :cowork_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsConnectorCoworkMetrics } |
#distinct_user_count ⇒ Integer
Number of distinct users who used the connector 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.
55 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 55 required :distinct_user_count, Integer |
#individual_auth_distinct_user_count ⇒ Integer?
Number of distinct users whose use of this connector on the requested day ran on
their own individual credential, connected through their own consent flow.
Companion bucket to managed_auth_distinct_user_count, which carries the
measurement, attribution, and null rules. Users whose requests used no stored
credential count in neither bucket.
65 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 65 required :individual_auth_distinct_user_count, Integer, nil?: true |
#managed_auth_distinct_user_count ⇒ Integer?
Number of distinct users whose use of this connector on the requested day ran on
Enterprise Managed Auth (an organization-managed credential provisioned through
the organization's identity provider), read from the token record each request
used. Null, never 0, when managed-auth reporting is not enabled for the
organization, the value cannot be attributed to the row, no credentialed
requests and no managed-token mint events (a managed credential being
provisioned for a user's use of the connector) were observed that day, or the
day predates 2026-07-01, the first day the backing data exists (forward-only
data, no backfill). When credentialed requests or mint events were observed and
attributed, both managed-auth fields populate, reporting 0 for a bucket with no
users; the two counts are independent, not a partition — a user whose requests
that day used both kinds of credential counts in both. Mint events carry user
but not surface attribution, so they count as observed auth activity on
user_id and rbac_group_id cuts — attributed to the user the credential was
provisioned for — but never on a cut that references product (group or
filter). Date-range rollup mode (starting_date/ending_date) computes both
fields exactly over the window — distinct users with at least one qualifying day
— when the whole window starts on or after 2026-07-01, with the null-versus-0
and mint-event rules applying with the window in place of the day; a range
starting earlier reports every managed-auth field as null, never a
partial-window value.
91 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 91 required :managed_auth_distinct_user_count, Integer, nil?: true |
#office_metrics ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsConnectorOfficeMetrics
Office Agent activity metrics for a single connector on a given day, broken out by Office product.
98 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 98 required :office_metrics, -> { Anthropic::Beta::Organization::BetaAnalyticsConnectorOfficeMetrics } |
#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.
163 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 163 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.
170 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 170 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.
178 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 178 optional :rbac_group_name, String, nil?: true |
#read_call_count ⇒ Integer?
Number of connector tool calls on the requested day whose trusted read-only
annotation marked them read-only. Call count, not distinct users. Every call
recorded on a classified surface lands in exactly one of read_call_count,
write_call_count, or unclassified_call_count, so the three sum to the day's
classified calls. Classification is forward-only per surface: claude.ai from
2026-06-01, Claude Code from 2026-05-30, Claude in Office from 2026-05-29,
Cowork from 2026-06-02 (Cowork clients predating annotation forwarding land in
unclassified_call_count). Null, never 0, when the value cannot be stated: the
read/write split is not enabled for this organization, or the day predates
2026-05-29. For a date-range total, sum the per-day values, but treat a window
that extends before 2026-05-29 as null rather than summing only its covered days
— date-range rollup mode (starting_date/ending_date) applies both rules
server-side.
116 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 116 required :read_call_count, Integer, nil?: true |
#unclassified_call_count ⇒ Integer?
Number of connector tool calls on the requested day with no trusted read-only
annotation — the annotation is optional in the MCP spec and is discarded when
connector access controls are active, so unclassified calls are common. This
field shows how much of the day's classified activity the read/write split
actually covers. Call count, not distinct users. One of the three
call-classification buckets; see read_call_count for the per-surface
data-start dates, null conditions, and date-range guidance.
128 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 128 required :unclassified_call_count, Integer, nil?: true |
#user_id ⇒ String?
Tagged user identifier (e.g. user_...). Present only when the request grouped
by user_id.
185 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 185 optional :user_id, String, nil?: true |
#write_call_count ⇒ Integer?
Number of connector tool calls on the requested day whose trusted read-only
annotation marked them not read-only. Call count, not distinct users. One of the
three call-classification buckets; see read_call_count for the per-surface
data-start dates, null conditions, and date-range guidance.
137 |
# File 'lib/anthropic/models/beta/organization/beta_analytics_connector_activity.rb', line 137 required :write_call_count, Integer, nil?: true |
Instance Method Details
#to_hash ⇒ { chat_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorChatMetrics, claude_code_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorClaudeCodeMetrics, connector_display_name: String?, connector_name: String, cowork_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorCoworkMetrics, distinct_user_count: Integer, individual_auth_distinct_user_count: Integer?, managed_auth_distinct_user_count: Integer?, office_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorOfficeMetrics, read_call_count: Integer?, unclassified_call_count: Integer?, write_call_count: Integer?, chat_cowork_unified_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorChatCoworkUnifiedMetrics?, product: String?, rbac_group_id: String?, rbac_group_name: String?, user_id: String? }
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'sig/anthropic/models/beta/organization/beta_analytics_connector_activity.rbs', line 81
def to_hash: -> {
chat_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorChatMetrics,
claude_code_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorClaudeCodeMetrics,
connector_display_name: String?,
connector_name: String,
cowork_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorCoworkMetrics,
distinct_user_count: Integer,
individual_auth_distinct_user_count: Integer?,
managed_auth_distinct_user_count: Integer?,
office_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorOfficeMetrics,
read_call_count: Integer?,
unclassified_call_count: Integer?,
write_call_count: Integer?,
chat_cowork_unified_metrics: Anthropic::Beta::Organization::BetaAnalyticsConnectorChatCoworkUnifiedMetrics?,
product: String?,
rbac_group_id: String?,
rbac_group_name: String?,
user_id: String?
}
|