Get Artifact Activity
GET/v1/organizations/analytics/artifacts
Get artifact-creation activity for a given day, broken out by MIME type.
Returns the full (artifact_type, is_shared) cube for the organization;
next_page is null except for grouped queries, which paginate. The cube
can be broken out per product, per member, or per RBAC group via
group_by[], and scoped via filter[]. Requires an API key with the
read:analytics scope.
Parameters
Returns
Get Artifact Activity
import os
from datetime import date
from anthropic import Anthropic
client = Anthropic(
api_key=os.environ.get(
"ANTHROPIC_API_KEY"
), # This is the default and can be omitted
)
page = client.beta.organization.analytics.artifacts.list(
date=date.fromisoformat("2019-12-27"),
)
page = page.data[0]
print(page.rbac_group_id)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"
}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"
}