Class: Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb,
sig/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rbs
Overview
Defined Under Namespace
Modules: BucketWidth, GroupBy, Order, OrderBy, Speed
Constant Summary
Constants included from Internal::Type::RequestParameters
Internal::Type::RequestParameters::Anthropic
Instance Attribute Summary collapse
-
#bucket_width ⇒ Symbol, ...
Time-bucket granularity.
-
#claude_tag_categories ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>?
Filter to Claude Tag (Claude in Slack) usage in specific spend categories.
-
#claude_tag_user_ids ⇒ Array<String>?
Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example
U0123ABCDEF), not claude.ai user ID. -
#context_windows ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>?
Filter to specific context-window pricing tiers.
-
#ending_at ⇒ Time?
End of range, exclusive.
-
#exclude_deleted_users ⇒ Boolean?
If true, omit rows for users who are deleted (
deleted: true). -
#group_by ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams::GroupBy>?
Break each actor's row out by the given dimensions.
-
#inference_geos ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>?
Filter to specific inference regions.
-
#limit ⇒ Integer?
Number of rows per page (1-1000, default 20).
-
#models ⇒ Array<String>?
Models to include.
-
#order ⇒ Symbol, ...
Sort direction.
-
#order_by ⇒ Symbol, ...
Metric to rank actors by.
-
#page ⇒ String?
Opaque cursor from a previous response's
next_pagefield. -
#products ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>?
Product surfaces to include.
-
#rbac_group_ids ⇒ Array<String>?
Filter to usage attributed to specific RBAC groups.
-
#slack_channel_ids ⇒ Array<String>?
Filter to usage originating from specific Slack channels.
-
#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams::Speed>?
Filter to fast or standard inference mode.
-
#starting_at ⇒ Time
Start of range, inclusive.
-
#user_ids ⇒ Array<String>?
Filter to specific users by tagged user ID.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(starting_at:, bucket_width: nil, claude_tag_categories: nil, claude_tag_user_ids: nil, context_windows: nil, ending_at: nil, exclude_deleted_users: nil, group_by: nil, inference_geos: nil, limit: nil, models: nil, order: nil, order_by: nil, page: nil, products: nil, rbac_group_ids: nil, slack_channel_ids: nil, speeds: nil, user_ids: nil, request_options: {}) ⇒ void
constructor
Some parameter documentations has been truncated, see UserUsageReportListParams for more details.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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(starting_at:, bucket_width: nil, claude_tag_categories: nil, claude_tag_user_ids: nil, context_windows: nil, ending_at: nil, exclude_deleted_users: nil, group_by: nil, inference_geos: nil, limit: nil, models: nil, order: nil, order_by: nil, page: nil, products: nil, rbac_group_ids: nil, slack_channel_ids: nil, speeds: nil, user_ids: nil, request_options: {}) ⇒ void
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams for more details.
|
|
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 186
|
Instance Attribute Details
#bucket_width ⇒ Symbol, ...
Time-bucket granularity. When set, each row's starting_at and ending_at are
populated and one actor may span several rows (one per time bucket with usage).
The time bucket counts toward limit, so one page can return multiple rows for
the same actor. ending_at is required when bucket_width is set, and with
bucket_width="1m" the range may span at most 24 hours. When omitted, each row
aggregates the full [starting_at, ending_at) range.
29 30 31 32 33 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 29 optional :bucket_width, enum: -> { Anthropic::Beta::Organization::Analytics::UserUsageReportListParams::BucketWidth }, nil?: true |
#claude_tag_categories ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>?
Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage
with no category never matches. dm usage is reported under the user's product
rather than claude-tag, so combining this filter with products[]=claude-tag
excludes it. Use group_by[]=claude_tag_category to break out per-category
values.
43 44 45 46 47 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 43 optional :claude_tag_categories, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsClaudeTagCategory] }, nil?: true |
#claude_tag_user_ids ⇒ Array<String>?
Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users,
by Slack user ID (for example U0123ABCDEF), not claude.ai user ID. Usage that
is not Claude Tag, and Claude Tag usage not attributed to a single user, never
matches. Use group_by[]=claude_tag_user_id to break out per-user values.
56 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 56 optional :claude_tag_user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#context_windows ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>?
Filter to specific context-window pricing tiers. Use group_by[]=context_window
to break out per-tier values.
63 64 65 66 67 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 63 optional :context_windows, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsContextWindow] }, nil?: true |
#ending_at ⇒ Time?
End of range, exclusive. When omitted, defaults to the earlier of now and
starting_at + 31 days. The range may span at most 31 days.
74 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 74 optional :ending_at, Time, nil?: true |
#exclude_deleted_users ⇒ Boolean?
If true, omit rows for users who are deleted (deleted: true). A page may
contain fewer than limit rows; use has_more and next_page to paginate as
usual.
82 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 82 optional :exclude_deleted_users, Anthropic::Internal::Type::Boolean |
#group_by ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams::GroupBy>?
Break each actor's row out by the given dimensions. Accepts the same values as
the bucketed /usage_report endpoint. limit bounds (actor × time bucket ×
dimension) rows — with dimensions or bucket_width present, one actor may span
several rows.
91 92 93 94 95 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 91 optional :group_by, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::UserUsageReportListParams::GroupBy] }, nil?: true |
#inference_geos ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>?
Filter to specific inference regions. not_available matches rows where the
region is unset. Use group_by[]=inference_geo to break out per-region values.
102 103 104 105 106 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 102 optional :inference_geos, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsInferenceGeoFilter] }, nil?: true |
#limit ⇒ Integer?
Number of rows per page (1-1000, default 20). One row per actor unless
group_by[] or bucket_width splits an actor across rows;
cost_type/token_type fan-out rows (cost endpoint only) are the exception —
they do not count toward this limit, so data can exceed it.
115 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 115 optional :limit, Integer |
#models ⇒ Array<String>?
Models to include. Defaults to all models. Use group_by[]=model to break out
per-model values.
122 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 122 optional :models, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#order ⇒ Symbol, ...
Sort direction. Defaults to desc.
128 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 128 optional :order, enum: -> { Anthropic::Beta::Organization::Analytics::UserUsageReportListParams::Order } |
#order_by ⇒ Symbol, ...
Metric to rank actors by. Defaults to total_tokens.
134 135 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 134 optional :order_by, enum: -> { Anthropic::Beta::Organization::Analytics::UserUsageReportListParams::OrderBy } |
#page ⇒ String?
Opaque cursor from a previous response's next_page field.
141 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 141 optional :page, String, nil?: true |
#products ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>?
Product surfaces to include. Defaults to all products.
147 148 149 150 151 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 147 optional :products, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsProductFilter] }, nil?: true |
#rbac_group_ids ⇒ Array<String>?
Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group
IDs (rbac_group_...) or bare group UUIDs. A row matches when the user belonged
to any of the listed groups on the (UTC) day the usage occurred; usage with no
group attribution never matches.
160 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 160 optional :rbac_group_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#slack_channel_ids ⇒ Array<String>?
Filter to usage originating from specific Slack channels. Use
group_by[]=slack_channel_id to break out per-channel values.
167 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 167 optional :slack_channel_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::UserUsageReportListParams::Speed>?
Filter to fast or standard inference mode. Use group_by[]=speed to break out
per-mode values.
174 175 176 177 178 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 174 optional :speeds, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::UserUsageReportListParams::Speed] }, nil?: true |
#starting_at ⇒ Time
Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
18 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 18 required :starting_at, Time |
#user_ids ⇒ Array<String>?
Filter to specific users by tagged user ID.
184 |
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 184 optional :user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rb', line 244
|
Instance Method Details
#to_hash ⇒ {
107 |
# File 'sig/anthropic/models/beta/organization/analytics/user_usage_report_list_params.rbs', line 107
def to_hash: -> {
|