Claude Platform Docs

Ottieni attività degli artifact

client.Beta.Organization.Analytics.Artifacts.List(ctx, query) (*PageCursor[BetaAnalyticsArtifactActivity], error)
GET/v1/organizations/analytics/artifacts

Ottieni l'attività di creazione di artifact per un determinato giorno, suddivisa per tipo MIME.

Restituisce il cubo completo (artifact_type, is_shared) per l'organizzazione; next_page è null tranne che per le query raggruppate, che sono paginate. Il cubo può essere suddiviso per prodotto, per membro o per gruppo RBAC tramite group_by[], e limitato tramite filter[]. Richiede una chiave API con lo scope read:analytics.

Parameters
query BetaOrganizationAnalyticsArtifactListParams
Date Time⁠Query parameter

UTC date in YYYY-MM-DD format. The day to get artifact activity for. Data is typically available with a 1-day lag (varies by query; the error for a too-recent date names the latest available day) and may be revised by a few percent over the following days. No earlier than 2026-01-01.

formatdate
Filter []string OptionalQuery parameter

Filters as dimension:value, e.g. filter[]=rbac_group_id:{id}. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: artifact_type, is_shared, product, rbac_group_id, user_id. Value forms: artifact_type is a canonical artifact MIME type (e.g. text/markdown) or other; is_shared is true or false; product is chat_cowork_unified, chat, claude_code, or cowork (the surfaces that create artifacts); rbac_group_id takes the tagged id (rbac_group_..., as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); user_id takes a tagged user id (user_...), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. chat_cowork_unified is accepted as a product value only on deployments that offer Chat and Cowork unified.

maxItems100
GroupBy []string OptionalQuery parameter

Dimensions to break results out by: product, user_id and/or rbac_group_id. The ungrouped artifact-type cube is finite and returned in full; grouped queries multiply the cube and paginate via next_page. product takes the values chat_cowork_unified, chat, claude_code, or cowork (the surfaces that create artifacts). rbac_group_id attributes a user to every group they held at any point during the requested UTC day, so grouped rows are not an exclusive partition. At most 100 entries.

maxItems100
const BetaOrganizationAnalyticsArtifactListParamsGroupByProduct BetaOrganizationAnalyticsArtifactListParamsGroupBy = "product"
const BetaOrganizationAnalyticsArtifactListParamsGroupByRBACGroupID BetaOrganizationAnalyticsArtifactListParamsGroupBy = "rbac_group_id"
const BetaOrganizationAnalyticsArtifactListParamsGroupByUserID BetaOrganizationAnalyticsArtifactListParamsGroupBy = "user_id"
Limit param.Opt[int64] OptionalQuery parameter

Maximum rows to return (1-1000, default 100). The ungrouped artifact-type cube is finite and returned in full; limit is the page size only when group_by[] multiplies the cube.

minimum1
maximum1000
Page param.Opt[string] OptionalQuery parameter

Opaque cursor from a previous response's next_page field. Only valid with group_by[] — the ungrouped cube is never paginated.

Returns
type BetaAnalyticsArtifactActivity struct { ArtifactType; ArtifactsCreatedCount; DistinctUserCount; /* 6 more */ }

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.

Ottieni attività degli artifact
package main

import (
	"context"
	"fmt"
	"time"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	page, err := client.Beta.Organization.Analytics.Artifacts.List(context.TODO(), anthropic.BetaOrganizationAnalyticsArtifactListParams{
		Date: time.Now(),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
Returns Examples
Response 200
{
  "data": [
    {
      "artifact_type": "artifact_type",
      "artifacts_created_count": 0,
      "distinct_user_count": 0,
      "is_shared": true,
      "published_artifacts_created_count": 0,
      "product": "product",
      "rbac_group_id": "rbac_group_id",
      "rbac_group_name": "rbac_group_name",
      "user_id": "user_id"
    }
  ],
  "next_page": "next_page"
}