Class BetaAnalyticsArtifactActivity

  • All Implemented Interfaces:

    
    public final class BetaAnalyticsArtifactActivity
    
                        

    Artifact-creation activity for one (artifact_type, is_shared) bucket on a given day.

    Artifacts form a small finite cube — the canonical MIME type (8 values incl. other) crossed with shared-vs-private — so the response is the full set of non-empty buckets, not a ranked/paginated list. Claude Code and Cowork artifacts report under text/html and are counted from 2026-08-17 onward; earlier days contain claude.ai chat artifacts only. With group_by[]=product / user_id / rbac_group_id each row is further split by the flat group keys and counts are scoped to that cut.

    • Constructor Detail

    • Method Detail

      • artifactType

         final String artifactType()

        Canonical artifact MIME type (e.g. text/markdown, application/vnd.ant.react, image/svg+xml), or other. Claude Code and Cowork artifacts report as text/html.

      • distinctUserCount

         final Long distinctUserCount()

        Number of distinct users who created artifacts in this bucket on the requested day

      • isShared

         final Boolean isShared()

        Whether the artifacts in this bucket have ever been shared (a Claude Code / Cowork artifact is shared once anyone beyond its creator may open it: named members, the whole organization, or anyone with the link).

      • publishedArtifactsCreatedCount

         final Long publishedArtifactsCreatedCount()

        Number of those artifacts that have been published (for Claude Code / Cowork artifacts: open to anyone with the link); never exceeds artifacts_created_count

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

      • _artifactType

         final JsonField<String> _artifactType()

        Returns the raw JSON value of artifactType.

        Unlike artifactType, this method doesn't throw if the JSON field has an unexpected type.

      • _artifactsCreatedCount

         final JsonField<Long> _artifactsCreatedCount()

        Returns the raw JSON value of artifactsCreatedCount.

        Unlike artifactsCreatedCount, 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.

      • _isShared

         final JsonField<Boolean> _isShared()

        Returns the raw JSON value of isShared.

        Unlike isShared, this method doesn't throw if the JSON field has an unexpected type.

      • _publishedArtifactsCreatedCount

         final JsonField<Long> _publishedArtifactsCreatedCount()

        Returns the raw JSON value of publishedArtifactsCreatedCount.

        Unlike publishedArtifactsCreatedCount, 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 BetaAnalyticsArtifactActivity 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.