Class BetaAnalyticsConnectorActivity
-
- All Implemented Interfaces:
public final class BetaAnalyticsConnectorActivityPer-connector activity data for a given day.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaAnalyticsConnectorActivity.BuilderA builder for BetaAnalyticsConnectorActivity.
-
Method Summary
Modifier and Type Method Description final BetaAnalyticsConnectorChatMetricschatMetrics()Claude.ai activity metrics for a single connector on a given day. final BetaAnalyticsConnectorClaudeCodeMetricsclaudeCodeMetrics()Claude Code activity metrics for a single connector on a given day. final Optional<String>connectorDisplayName()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).final StringconnectorName()Name of the connector. final BetaAnalyticsConnectorCoworkMetricscoworkMetrics()Cowork activity metrics for a single connector on a given day. final LongdistinctUserCount()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. final Optional<Long>individualAuthDistinctUserCount()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. final Optional<Long>managedAuthDistinctUserCount()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. final BetaAnalyticsConnectorOfficeMetricsofficeMetrics()Office Agent activity metrics for a single connector on a given day, broken out by Office product. final Optional<Long>readCallCount()Number of connector tool calls on the requested day whose trusted read-only annotation marked them read-only. final Optional<Long>unclassifiedCallCount()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. final Optional<Long>writeCallCount()Number of connector tool calls on the requested day whose trusted read-only annotation marked them not read-only. final Optional<BetaAnalyticsConnectorChatCoworkUnifiedMetrics>chatCoworkUnifiedMetrics()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. final Optional<String>product()Product that produced this row's activity: one of chat,claude_code,cowork,office_agent, orchat_cowork_unified(Chat and Cowork unified).final Optional<String>rbacGroupId()Tagged RBAC group identifier ( rbac_group_...), matching the spend-limits API spelling.final Optional<String>rbacGroupName()Resolved RBAC group display name, alongside rbac_group_idwhen name resolution is available.final Optional<String>userId()Tagged user identifier (e.g. final JsonField<BetaAnalyticsConnectorChatMetrics>_chatMetrics()Returns the raw JSON value of chatMetrics. final JsonField<BetaAnalyticsConnectorClaudeCodeMetrics>_claudeCodeMetrics()Returns the raw JSON value of claudeCodeMetrics. final JsonField<String>_connectorDisplayName()Returns the raw JSON value of connectorDisplayName. final JsonField<String>_connectorName()Returns the raw JSON value of connectorName. final JsonField<BetaAnalyticsConnectorCoworkMetrics>_coworkMetrics()Returns the raw JSON value of coworkMetrics. final JsonField<Long>_distinctUserCount()Returns the raw JSON value of distinctUserCount. final JsonField<Long>_individualAuthDistinctUserCount()Returns the raw JSON value of individualAuthDistinctUserCount. final JsonField<Long>_managedAuthDistinctUserCount()Returns the raw JSON value of managedAuthDistinctUserCount. final JsonField<BetaAnalyticsConnectorOfficeMetrics>_officeMetrics()Returns the raw JSON value of officeMetrics. final JsonField<Long>_readCallCount()Returns the raw JSON value of readCallCount. final JsonField<Long>_unclassifiedCallCount()Returns the raw JSON value of unclassifiedCallCount. final JsonField<Long>_writeCallCount()Returns the raw JSON value of writeCallCount. final JsonField<BetaAnalyticsConnectorChatCoworkUnifiedMetrics>_chatCoworkUnifiedMetrics()Returns the raw JSON value of chatCoworkUnifiedMetrics. final JsonField<String>_product()Returns the raw JSON value of product. final JsonField<String>_rbacGroupId()Returns the raw JSON value of rbacGroupId. final JsonField<String>_rbacGroupName()Returns the raw JSON value of rbacGroupName. final JsonField<String>_userId()Returns the raw JSON value of userId. final Map<String, JsonValue>_additionalProperties()final BetaAnalyticsConnectorActivity.BuildertoBuilder()final BetaAnalyticsConnectorActivityvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaAnalyticsConnectorActivity.Builderbuilder()Returns a mutable builder for constructing an instance of BetaAnalyticsConnectorActivity. -
-
Method Detail
-
chatMetrics
final BetaAnalyticsConnectorChatMetrics chatMetrics()
Claude.ai activity metrics for a single connector on a given day.
-
claudeCodeMetrics
final BetaAnalyticsConnectorClaudeCodeMetrics claudeCodeMetrics()
Claude Code activity metrics for a single connector on a given day.
-
connectorDisplayName
final Optional<String> connectorDisplayName()
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_nameremains the row's stable key for sorting and pagination, andfilter[]=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 readableconnector_name. Null whenconnector_nameis 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.
-
connectorName
final String connectorName()
Name of the connector. Some rows carry an opaque connector id here instead of a readable name;
connector_display_nameholds the resolved name for those rows.
-
coworkMetrics
final BetaAnalyticsConnectorCoworkMetrics coworkMetrics()
Cowork activity metrics for a single connector on a given day.
-
distinctUserCount
final Long distinctUserCount()
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.
-
individualAuthDistinctUserCount
final Optional<Long> individualAuthDistinctUserCount()
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.
-
managedAuthDistinctUserCount
final Optional<Long> managedAuthDistinctUserCount()
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_idandrbac_group_idcuts — attributed to the user the credential was provisioned for — but never on a cut that referencesproduct(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.
-
officeMetrics
final BetaAnalyticsConnectorOfficeMetrics officeMetrics()
Office Agent activity metrics for a single connector on a given day, broken out by Office product.
-
readCallCount
final Optional<Long> readCallCount()
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, orunclassified_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 inunclassified_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.
-
unclassifiedCallCount
final Optional<Long> unclassifiedCallCount()
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_countfor the per-surface data-start dates, null conditions, and date-range guidance.
-
writeCallCount
final Optional<Long> writeCallCount()
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_countfor the per-surface data-start dates, null conditions, and date-range guidance.
-
chatCoworkUnifiedMetrics
final Optional<BetaAnalyticsConnectorChatCoworkUnifiedMetrics> chatCoworkUnifiedMetrics()
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.
-
product
final Optional<String> product()
Product that produced this row's activity: one of
chat,claude_code,cowork,office_agent, orchat_cowork_unified(Chat and Cowork unified). These are the canonical Cost & Usage product names; anoffice_agentrow's per-surface breakdown is in itsoffice_metrics. On/pluginsonlycowork,claude_codeandchat_cowork_unifiedoccur (the only surfaces with plugin attribution); on/artifactsonlychat,claude_code,coworkandchat_cowork_unifiedoccur (the surfaces that create artifacts);/apps/chat/projectsdoes not support the product dimension (aproductentry ingroup_by[]orfilter[]there is rejected). Present only when the request grouped byproduct.
-
rbacGroupId
final Optional<String> rbacGroupId()
Tagged RBAC group identifier (
rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped byrbac_group_id.
-
rbacGroupName
final Optional<String> rbacGroupName()
Resolved RBAC group display name, alongside
rbac_group_idwhen name resolution is available. Null if the group has been deleted or its name could not be resolved;rbac_group_idremains the stable key.
-
userId
final Optional<String> userId()
Tagged user identifier (e.g.
user_...). Present only when the request grouped byuser_id.
-
_chatMetrics
final JsonField<BetaAnalyticsConnectorChatMetrics> _chatMetrics()
Returns the raw JSON value of chatMetrics.
Unlike chatMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_claudeCodeMetrics
final JsonField<BetaAnalyticsConnectorClaudeCodeMetrics> _claudeCodeMetrics()
Returns the raw JSON value of claudeCodeMetrics.
Unlike claudeCodeMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_connectorDisplayName
final JsonField<String> _connectorDisplayName()
Returns the raw JSON value of connectorDisplayName.
Unlike connectorDisplayName, this method doesn't throw if the JSON field has an unexpected type.
-
_connectorName
final JsonField<String> _connectorName()
Returns the raw JSON value of connectorName.
Unlike connectorName, this method doesn't throw if the JSON field has an unexpected type.
-
_coworkMetrics
final JsonField<BetaAnalyticsConnectorCoworkMetrics> _coworkMetrics()
Returns the raw JSON value of coworkMetrics.
Unlike coworkMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_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.
-
_individualAuthDistinctUserCount
final JsonField<Long> _individualAuthDistinctUserCount()
Returns the raw JSON value of individualAuthDistinctUserCount.
Unlike individualAuthDistinctUserCount, this method doesn't throw if the JSON field has an unexpected type.
-
_managedAuthDistinctUserCount
final JsonField<Long> _managedAuthDistinctUserCount()
Returns the raw JSON value of managedAuthDistinctUserCount.
Unlike managedAuthDistinctUserCount, this method doesn't throw if the JSON field has an unexpected type.
-
_officeMetrics
final JsonField<BetaAnalyticsConnectorOfficeMetrics> _officeMetrics()
Returns the raw JSON value of officeMetrics.
Unlike officeMetrics, this method doesn't throw if the JSON field has an unexpected type.
-
_readCallCount
final JsonField<Long> _readCallCount()
Returns the raw JSON value of readCallCount.
Unlike readCallCount, this method doesn't throw if the JSON field has an unexpected type.
-
_unclassifiedCallCount
final JsonField<Long> _unclassifiedCallCount()
Returns the raw JSON value of unclassifiedCallCount.
Unlike unclassifiedCallCount, this method doesn't throw if the JSON field has an unexpected type.
-
_writeCallCount
final JsonField<Long> _writeCallCount()
Returns the raw JSON value of writeCallCount.
Unlike writeCallCount, this method doesn't throw if the JSON field has an unexpected type.
-
_chatCoworkUnifiedMetrics
final JsonField<BetaAnalyticsConnectorChatCoworkUnifiedMetrics> _chatCoworkUnifiedMetrics()
Returns the raw JSON value of chatCoworkUnifiedMetrics.
Unlike chatCoworkUnifiedMetrics, 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.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaAnalyticsConnectorActivity.Builder toBuilder()
-
validate
final BetaAnalyticsConnectorActivity 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.
-
builder
final static BetaAnalyticsConnectorActivity.Builder builder()
Returns a mutable builder for constructing an instance of BetaAnalyticsConnectorActivity.
The following fields are required:
.chatMetrics() .claudeCodeMetrics() .connectorDisplayName() .connectorName() .coworkMetrics() .distinctUserCount() .individualAuthDistinctUserCount() .managedAuthDistinctUserCount() .officeMetrics() .readCallCount() .unclassifiedCallCount() .writeCallCount()
-
-
-
-