Class: Anthropic::Models::Beta::Organization::Analytics::BetaAnalyticsUsageGroup
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::Analytics::BetaAnalyticsUsageGroup
- Defined in:
- lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb,
sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rbs
Instance Attribute Summary collapse
-
#actor ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsReportUserActor, ...
The identity the usage is attributed to: the user if one is attributed, else the service account, else the federated (cloud-platform) identity, else the API key.
-
#actor_type ⇒ Symbol, ...
Kind of identity the usage is attributed to; matches
actor.typewhenactoris set. -
#agent_id ⇒ String?
Claude Managed Agents agent whose session incurred the usage.
-
#api_key_id ⇒ String?
API key that authenticated the requests, as a tagged API key ID, whichever identity
actorresolves to. -
#claude_tag_category ⇒ Symbol, ...
Claude Tag (Claude in Slack) spend category:
engaged(a person addressed Claude in a channel or thread),proactive(Claude responded without being addressed),scheduled(a scheduled routine ran),monitoring(Claude watching a channel it was asked to monitor), ordm(direct messages with Claude). -
#claude_tag_user_id ⇒ String?
Slack user ID (for example
U0123ABCDEF) of the member the Claude Tag (Claude in Slack) usage is attributed to, not a claude.ai user ID. -
#context_window ⇒ Symbol, ...
Context-window pricing tier of the usage or cost.
-
#deployment_id ⇒ String?
Deployment that started the Claude Managed Agents session.
-
#environment_id ⇒ String?
Claude Managed Agents environment the session ran in.
-
#inference_geo ⇒ Symbol, ...
Inference region of the usage or cost.
-
#model ⇒ String?
Model that produced the usage or cost, as a model name in the form the
models[]filter accepts (for example,claude-opus-5-5). -
#organization_id ⇒ String?
UUID of the child organization the usage belongs to, on a parent organization's report across its children.
-
#product ⇒ String?
Product surface that produced the usage or cost.
-
#rbac_group_id ⇒ String?
RBAC group (team) the usage is attributed to, in the public tagged
rbac_group_...spelling — the same spelling the activity resources use for this key, so the same team has one id across resources and it round-trips as anrbac_group_ids[]filter value. -
#service_tier ⇒ Symbol, ...
Service tier the usage was served at.
-
#session_id ⇒ String?
Claude Managed Agents session that incurred the usage.
-
#slack_channel_id ⇒ String?
Slack channel the usage originated from.
-
#speed ⇒ Symbol, ...
Inference speed mode of the usage or cost:
fastorstandard. -
#user_profile_id ⇒ String?
User profile the usage was attributed to, as a tagged
uprof_ID. -
#workspace_id ⇒ String?
Workspace the usage occurred in, as a tagged workspace ID, including a Claude Platform organization's default workspace.
Instance Method Summary collapse
-
#initialize(actor:, actor_type:, agent_id:, api_key_id:, claude_tag_category:, claude_tag_user_id:, context_window:, deployment_id:, environment_id:, inference_geo:, model:, organization_id:, product:, rbac_group_id:, service_tier:, session_id:, slack_channel_id:, speed:, user_profile_id:, workspace_id:) ⇒ BetaAnalyticsUsageGroup
constructor
The dimension values one usage row is broken out by; each is null unless its dimension is in
group_by[]. - #to_hash ⇒ { actor: Anthropic::Models::Beta::Organization::beta_analytics_actor?, actor_type: Anthropic::Models::Beta::Organization::beta_analytics_actor_type?, agent_id: String?, api_key_id: String?, claude_tag_category: Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category?, claude_tag_user_id: String?, context_window: Anthropic::Models::Beta::Organization::beta_analytics_context_window?, deployment_id: String?, environment_id: String?, inference_geo: Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_inference_geo?, model: String?, organization_id: String?, product: String?, rbac_group_id: String?, service_tier: Anthropic::Models::Beta::Organization::beta_analytics_service_tier?, session_id: String?, slack_channel_id: String?, speed: Anthropic::Models::Beta::Organization::beta_analytics_speed?, user_profile_id: String?, workspace_id: String? }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(actor:, actor_type:, agent_id:, api_key_id:, claude_tag_category:, claude_tag_user_id:, context_window:, deployment_id:, environment_id:, inference_geo:, model:, organization_id:, product:, rbac_group_id:, service_tier:, session_id:, slack_channel_id:, speed:, user_profile_id:, workspace_id:) ⇒ BetaAnalyticsUsageGroup
The dimension values one usage row is broken out by; each is null unless its
dimension is in group_by[].
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Analytics::BetaAnalyticsUsageGroup for more details.
|
|
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 203
|
Instance Attribute Details
#actor ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsReportUserActor, ...
The identity the usage is attributed to: the user if one is attributed, else the
service account, else the federated (cloud-platform) identity, else the API key.
Populated only when actor is in group_by[]; null for usage with no
attributable identity, and for users' and federated identities' usage when the
reader is a member who can see only some workspaces. Distinct identities the
server cannot render also read null, each as its own row.
18 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 18 required :actor, union: -> { Anthropic::Beta::Organization::BetaAnalyticsActor }, nil?: true |
#actor_type ⇒ Symbol, ...
Kind of identity the usage is attributed to; matches actor.type when actor
is set. Populated only when actor_type is in group_by[].
25 26 27 28 29 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 25 required :actor_type, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsActorType }, nil?: true |
#agent_id ⇒ String?
Claude Managed Agents agent whose session incurred the usage. Populated only
when agent_id is in group_by[]; null for usage outside a managed session.
36 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 36 required :agent_id, String, nil?: true |
#api_key_id ⇒ String?
API key that authenticated the requests, as a tagged API key ID, whichever
identity actor resolves to. Populated only when api_key_id is in
group_by[]; null for usage not authenticated by an API key.
44 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 44 required :api_key_id, String, nil?: true |
#claude_tag_category ⇒ Symbol, ...
Claude Tag (Claude in Slack) spend category: engaged (a person addressed
Claude in a channel or thread), proactive (Claude responded without being
addressed), scheduled (a scheduled routine ran), monitoring (Claude watching
a channel it was asked to monitor), or dm (direct messages with Claude).
Populated only when claude_tag_category is in group_by[]; null for usage
that is not Claude Tag. New categories may be added over time.
55 56 57 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 55 required :claude_tag_category, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsClaudeTagCategory }, nil?: true |
#claude_tag_user_id ⇒ String?
Slack user ID (for example U0123ABCDEF) of the member the Claude Tag (Claude
in Slack) usage is attributed to, not a claude.ai user ID. Populated only when
claude_tag_user_id is in group_by[]; null for usage that is not Claude Tag
and for Claude Tag usage that is not attributed to a single user (for example
monitoring, and proactive usage Claude initiated), so per-user rows can sum
to less than the Claude Tag total. Cannot be combined with
group_by[]=rbac_group_id or the rbac_group_ids[] filter.
69 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 69 required :claude_tag_user_id, String, nil?: true |
#context_window ⇒ Symbol, ...
Context-window pricing tier of the usage or cost. Null unless context_window
is in group_by[]; it can also be null on grouped rows with no context-window
tier, such as code execution.
77 78 79 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 77 required :context_window, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsContextWindow }, nil?: true |
#deployment_id ⇒ String?
Deployment that started the Claude Managed Agents session. Populated only when
deployment_id is in group_by[]; null for usage outside a managed session and
for sessions no deployment started.
87 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 87 required :deployment_id, String, nil?: true |
#environment_id ⇒ String?
Claude Managed Agents environment the session ran in. Populated only when
environment_id is in group_by[]; null for usage outside a managed session.
94 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 94 required :environment_id, String, nil?: true |
#inference_geo ⇒ Symbol, ...
Inference region of the usage or cost. Null unless inference_geo is in
group_by[]; it can also be null on grouped rows where the region is not set
(the rows that inference_geos[]=not_available matches).
102 103 104 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 102 required :inference_geo, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsUsageCostInferenceGeo }, nil?: true |
#model ⇒ String?
Model that produced the usage or cost, as a model name in the form the
models[] filter accepts (for example, claude-opus-5-5). Null unless model
is in group_by[]; it can also be null on grouped rows whose usage or cost is
not attributed to a specific model, such as code execution.
113 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 113 required :model, String, nil?: true |
#organization_id ⇒ String?
UUID of the child organization the usage belongs to, on a parent organization's
report across its children. Null unless organization_id is in group_by[].
120 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 120 required :organization_id, String, nil?: true |
#product ⇒ String?
Product surface that produced the usage or cost. Null unless product is in
group_by[]; it can also be null on grouped rows whose usage cannot be
attributed to a known surface. Values include chat, claude_code, cowork,
office_agent, claude_in_chrome, claude_design, claude_tag, and
chat_cowork_unified. claude_tag is Claude Tag, the Claude product in Slack.
chat_cowork_unified is Chat and Cowork unified, Cowork's features inside
claude.ai chat: chat and Cowork usage by a member who has it turned on is
reported under this value instead of chat or cowork. It is accepted as a
filter only where Chat and Cowork unified is available. cc_security_autopatch
is work that Claude Security runs for the organization. Some unattributed usage
is reported as "other".
136 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 136 required :product, String, nil?: true |
#rbac_group_id ⇒ String?
RBAC group (team) the usage is attributed to, in the public tagged
rbac_group_... spelling — the same spelling the activity resources use for
this key, so the same team has one id across resources and it round-trips as an
rbac_group_ids[] filter value. Populated only when rbac_group_id is in
group_by[]. Any-membership semantics: a user in several groups contributes
their full usage to each of those groups' rows, so the named-group rows overlap
and their sum can exceed the org total. A null value is the single unassigned
row: users in no group on that (UTC) day. For the true org total, run the same
query without group_by[].
150 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 150 required :rbac_group_id, String, nil?: true |
#service_tier ⇒ Symbol, ...
Service tier the usage was served at. Populated only when service_tier is in
group_by[]; null for usage with no service tier (for example, code execution).
157 158 159 160 161 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 157 required :service_tier, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsServiceTier }, nil?: true |
#session_id ⇒ String?
Claude Managed Agents session that incurred the usage. Populated only when
session_id is in group_by[]; null for usage outside a managed session.
168 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 168 required :session_id, String, nil?: true |
#slack_channel_id ⇒ String?
Slack channel the usage originated from. Populated only when slack_channel_id
is in group_by[]; null for usage outside Slack, for some Claude Tag usage that
has no channel recorded, and for usage recorded before channel attribution was
enabled.
177 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 177 required :slack_channel_id, String, nil?: true |
#speed ⇒ Symbol, ...
Inference speed mode of the usage or cost: fast or standard. Null unless
speed is in group_by[].
184 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 184 required :speed, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsSpeed }, nil?: true |
#user_profile_id ⇒ String?
User profile the usage was attributed to, as a tagged uprof_ ID. Populated
only when user_profile_id is in group_by[]; null for usage that named no
profile.
192 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 192 required :user_profile_id, String, nil?: true |
#workspace_id ⇒ String?
Workspace the usage occurred in, as a tagged workspace ID, including a Claude
Platform organization's default workspace. Populated only when workspace_id is
in group_by[]; null for usage in a Claude Enterprise organization's default
workspace, which is its only workspace.
201 |
# File 'lib/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rb', line 201 required :workspace_id, String, nil?: true |
Instance Method Details
#to_hash ⇒ { actor: Anthropic::Models::Beta::Organization::beta_analytics_actor?, actor_type: Anthropic::Models::Beta::Organization::beta_analytics_actor_type?, agent_id: String?, api_key_id: String?, claude_tag_category: Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category?, claude_tag_user_id: String?, context_window: Anthropic::Models::Beta::Organization::beta_analytics_context_window?, deployment_id: String?, environment_id: String?, inference_geo: Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_inference_geo?, model: String?, organization_id: String?, product: String?, rbac_group_id: String?, service_tier: Anthropic::Models::Beta::Organization::beta_analytics_service_tier?, session_id: String?, slack_channel_id: String?, speed: Anthropic::Models::Beta::Organization::beta_analytics_speed?, user_profile_id: String?, workspace_id: String? }
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'sig/anthropic/models/beta/organization/analytics/beta_analytics_usage_group.rbs', line 94
def to_hash: -> {
actor: Anthropic::Models::Beta::Organization::beta_analytics_actor?,
actor_type: Anthropic::Models::Beta::Organization::beta_analytics_actor_type?,
agent_id: String?,
api_key_id: String?,
claude_tag_category: Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category?,
claude_tag_user_id: String?,
context_window: Anthropic::Models::Beta::Organization::beta_analytics_context_window?,
deployment_id: String?,
environment_id: String?,
inference_geo: Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_inference_geo?,
model: String?,
organization_id: String?,
product: String?,
rbac_group_id: String?,
service_tier: Anthropic::Models::Beta::Organization::beta_analytics_service_tier?,
session_id: String?,
slack_channel_id: String?,
speed: Anthropic::Models::Beta::Organization::beta_analytics_speed?,
user_profile_id: String?,
workspace_id: String?
}
|