Class: Anthropic::Models::Beta::Organization::Analytics::UsageReportListParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb,
sig/anthropic/models/beta/organization/analytics/usage_report_list_params.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Organization::Analytics::UsageReport#list

Defined Under Namespace

Modules: BucketWidth, GroupBy, Speed

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Anthropic

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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, group_by: nil, inference_geos: nil, limit: nil, models: 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::UsageReportListParams for more details.

Parameters:



# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 157

Instance Attribute Details

#bucket_width ⇒ Symbol, ...

Time bucket granularity.



24
25
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 24

optional :bucket_width,
enum: -> { Anthropic::Beta::Organization::Analytics::UsageReportListParams::BucketWidth }

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

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category], nil)

Returns:



35
36
37
38
39
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 35

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.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


48
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 48

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.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window], nil)

Returns:



55
56
57
58
59
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 55

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


66
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 66

optional :ending_at, Time, nil?: true

#group_by ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::UsageReportListParams::GroupBy>?

Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::Analytics::UsageReportListParams::group_by], nil)

Returns:



75
76
77
78
79
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 75

optional :group_by,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::UsageReportListParams::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.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter], nil)

Returns:



86
87
88
89
90
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 86

optional :inference_geos,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsInferenceGeoFilter]
},
nil?: true

#limit ⇒ Integer?

Maximum number of time buckets per page. Defaults and caps vary by bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m: default 60, max 256).

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


98
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 98

optional :limit, Integer, nil?: true

#models ⇒ Array<String>?

Models to include. Defaults to all models. Use group_by[]=model to break out per-model values.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


105
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 105

optional :models, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#page ⇒ String?

Opaque cursor from a previous response's next_page field.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


111
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 111

optional :page, String, nil?: true

#products ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>?

Product surfaces to include. Defaults to all products. Use group_by[]=product to break out per-product values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter], nil)

Returns:



118
119
120
121
122
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 118

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.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


131
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 131

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.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


138
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 138

optional :slack_channel_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::UsageReportListParams::Speed>?

Filter to fast or standard inference mode. Use group_by[]=speed to break out per-mode values.

Parameters:

  • value (::Array[Anthropic::Models::Beta::Organization::Analytics::UsageReportListParams::speed], nil)

Returns:



145
146
147
148
149
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 145

optional :speeds,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::UsageReportListParams::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.

Parameters:

  • value (Time)

Returns:

  • (Time)


18
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 18

required :starting_at, Time

#user_ids ⇒ Array<String>?

Filter to specific users by tagged user ID.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


155
# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 155

optional :user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/beta/organization/analytics/usage_report_list_params.rb', line 204

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


87
# File 'sig/anthropic/models/beta/organization/analytics/usage_report_list_params.rbs', line 87

def to_hash: -> {