Class AnalyticsConnectorActivity

    • Constructor Detail

    • Method Detail

      • connectorDisplayName

         final Optional<String> connectorDisplayName()

        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.

      • connectorName

         final String connectorName()

        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.

      • 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_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.

      • 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, 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.

      • 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_count for 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_count for the per-surface data-start dates, null conditions, and date-range guidance.

      • chatCoworkUnifiedMetrics

         final Optional<AnalyticsConnectorChatCoworkUnifiedMetrics> 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, 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.

      • rbacGroupId

         final Optional<String> rbacGroupId()

        Tagged RBAC group identifier (rbac_group_...), matching the spend-limits API spelling. Present only when the request grouped by rbac_group_id.

      • rbacGroupName

         final Optional<String> rbacGroupName()

        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.

      • userId

         final Optional<String> userId()

        Tagged user identifier (e.g. user_...). Present only when the request grouped by user_id.

      • _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.

      • _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.

      • _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.

      • _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.

      • validate

         final AnalyticsConnectorActivity 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 AnalyticsConnectorActivity.Builder builder()

        Returns a mutable builder for constructing an instance of AnalyticsConnectorActivity.

        The following fields are required:

        .chatMetrics()
        .claudeCodeMetrics()
        .connectorDisplayName()
        .connectorName()
        .coworkMetrics()
        .distinctUserCount()
        .individualAuthDistinctUserCount()
        .managedAuthDistinctUserCount()
        .officeMetrics()
        .readCallCount()
        .unclassifiedCallCount()
        .writeCallCount()