Class: Anthropic::Models::Beta::Organization::Analytics::UsageListParams

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_list_params.rb,
sig/anthropic/models/beta/organization/analytics/usage_list_params.rbs

Overview

See Also:

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

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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:, actor_ids: nil, actor_types: nil, agent_ids: nil, api_key_ids: nil, claude_tag_categories: nil, claude_tag_user_ids: nil, context_windows: nil, deployment_ids: nil, ending_at: nil, environment_ids: nil, exclude_deleted_users: nil, group_by: nil, inference_geos: nil, limit: nil, models: nil, order: nil, order_by: nil, organization_ids: nil, page: nil, products: nil, rbac_group_ids: nil, service_tiers: nil, session_ids: nil, slack_channel_ids: nil, speeds: nil, time_bucket_width: nil, user_profile_ids: nil, workspace_ids: nil, betas: nil, request_options: {}) ⇒ UsageListParams

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Analytics::UsageListParams for more details.

Parameters:

  • starting_at (Time) —

    Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days a

  • actor_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage attributed to specific identities, by tagged ID: a user_...,

  • actor_types (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsActorType>, nil) (defaults to: nil) —

    Filter to usage attributed to specific kinds of identity. Use

  • agent_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage incurred by sessions of specific Claude Managed Agents agents. U

  • api_key_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage authenticated by specific API keys, by tagged API key ID (

  • claude_tag_categories (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>, nil) (defaults to: nil) —

    Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage

  • claude_tag_user_ids (Array<String>, nil) (defaults to: nil) —

    Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users,

  • context_windows (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>, nil) (defaults to: nil) —

    Filter to specific context-window pricing tiers. Use group_by[]=context_window

  • deployment_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage incurred by Claude Managed Agents sessions that specific deploym

  • ending_at (Time, nil) (defaults to: nil) —

    End of range, exclusive. Required when time_bucket_width is set. Without

  • environment_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage incurred by Claude Managed Agents sessions that ran in specific

  • exclude_deleted_users (Boolean) (defaults to: nil) —

    If true, omit rows whose actor is a user_actor with deleted: true. Require

  • group_by (Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::BetaAnalyticsUsageGroupBy>, nil) (defaults to: nil) —

    Dimensions to break usage out by (at most 5): one row per combination of their v

  • inference_geos (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>, nil) (defaults to: nil) —

    Filter to specific inference regions. not_available matches rows where the reg

  • limit (Integer) (defaults to: nil) —

    Number of rows per page (1-1000, default 20). cost_type/token_type fan-out r

  • models (Array<String>, nil) (defaults to: nil) —

    Models to include. Defaults to all models. Use group_by[]=model to break out p

  • order (Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsUsageCostSortOrder) (defaults to: nil) —

    Sort direction of the order_by metric, or of the time buckets when order_by

  • order_by (Symbol, Anthropic::Models::Beta::Organization::Analytics::BetaAnalyticsUsageOrderBy) (defaults to: nil) —

    Row order. A metric ranks rows by that metric in the order direction. time o

  • organization_ids (Array<String>, nil) (defaults to: nil) —

    Filter a parent organization's report to specific child organizations, by organi

  • page (String, nil) (defaults to: nil) —

    Opaque cursor from a previous response's next_page field.

  • products (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsUsageCostProductFilter>, nil) (defaults to: nil) —

    Product surfaces to include. Defaults to all products.

  • rbac_group_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group ID

  • service_tiers (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsServiceTier>, nil) (defaults to: nil) —

    Filter to specific service tiers. Use group_by[]=service_tier to break out per

  • session_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage incurred by specific Claude Managed Agents sessions, by tagged s

  • slack_channel_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage originating from specific Slack channels. Use

  • speeds (Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsSpeed>, nil) (defaults to: nil) —

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

  • time_bucket_width (Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsTimeBucketWidth, nil) (defaults to: nil) —

    Time-bucket granularity. When set, rows are returned per time bucket (one per bu

  • user_profile_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage attributed to specific user profiles, by tagged user profile ID

  • workspace_ids (Array<String>, nil) (defaults to: nil) —

    Filter to usage in specific workspaces, by tagged workspace ID (wrkspc_...). U

  • betas (Array<Symbol, String, Anthropic::Models::AnthropicBeta>) (defaults to: nil) —

    This endpoint is in beta: requests must send analytics-usage-cost-2026-08-24 i

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})
  • starting_at: (Time)
  • actor_ids: (::Array[String], nil) (defaults to: nil)
  • actor_types: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_actor_type], nil) (defaults to: nil)
  • agent_ids: (::Array[String], nil) (defaults to: nil)
  • api_key_ids: (::Array[String], nil) (defaults to: nil)
  • claude_tag_categories: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category], nil) (defaults to: nil)
  • claude_tag_user_ids: (::Array[String], nil) (defaults to: nil)
  • context_windows: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window], nil) (defaults to: nil)
  • deployment_ids: (::Array[String], nil) (defaults to: nil)
  • ending_at: (Time, nil) (defaults to: nil)
  • environment_ids: (::Array[String], nil) (defaults to: nil)
  • exclude_deleted_users: (Boolean) (defaults to: nil)
  • group_by: (::Array[Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_group_by], nil) (defaults to: nil)
  • inference_geos: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter], nil) (defaults to: nil)
  • limit: (Integer) (defaults to: nil)
  • models: (::Array[String], nil) (defaults to: nil)
  • order: (Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_sort_order) (defaults to: nil)
  • order_by: (Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_order_by) (defaults to: nil)
  • organization_ids: (::Array[String], nil) (defaults to: nil)
  • page: (String, nil) (defaults to: nil)
  • products: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_product_filter], nil) (defaults to: nil)
  • rbac_group_ids: (::Array[String], nil) (defaults to: nil)
  • service_tiers: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_service_tier], nil) (defaults to: nil)
  • session_ids: (::Array[String], nil) (defaults to: nil)
  • slack_channel_ids: (::Array[String], nil) (defaults to: nil)
  • speeds: (::Array[Anthropic::Models::Beta::Organization::beta_analytics_speed], nil) (defaults to: nil)
  • time_bucket_width: (Anthropic::Models::Beta::Organization::beta_analytics_time_bucket_width, nil) (defaults to: nil)
  • user_profile_ids: (::Array[String], nil) (defaults to: nil)
  • workspace_ids: (::Array[String], nil) (defaults to: nil)
  • betas: (::Array[Anthropic::Models::anthropic_beta]) (defaults to: nil)
  • request_options: (Anthropic::request_opts) (defaults to: {})


# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 288

Instance Attribute Details

#actor_ids ⇒ Array<String>?

Filter to usage attributed to specific identities, by tagged ID: a user_..., svac_... (service account), or apikey_... ID. An apikey_ entry matches only usage attributed to the key itself, not usage on that key attributed to a user or service account (use api_key_ids[] for every request a key authenticated). Federated identities have no tagged ID; select them with actor_types[]. Use group_by[]=actor to break out per-identity values.

Parameters:

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

Returns:

  • (Array<String>, nil)


29
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 29

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

#actor_types ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsActorType>?

Filter to usage attributed to specific kinds of identity. Use group_by[]=actor_type to break out per-kind values.

Parameters:

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

Returns:



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

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

#agent_ids ⇒ Array<String>?

Filter to usage incurred by sessions of specific Claude Managed Agents agents. Use group_by[]=agent_id to break out per-agent values.

Parameters:

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

Returns:

  • (Array<String>, nil)


47
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 47

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

#api_key_ids ⇒ Array<String>?

Filter to usage authenticated by specific API keys, by tagged API key ID (apikey_...), whichever identity the usage is attributed to. Include an empty entry (api_key_ids[]=) to also match usage that no API key authenticated. Use group_by[]=api_key_id to break out per-key values; usage without a key has a null api_key_id.

Parameters:

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

Returns:

  • (Array<String>, nil)


57
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 57

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

#betas ⇒ Array<Symbol, String, Anthropic::Models::AnthropicBeta>?

This endpoint is in beta: requests must send analytics-usage-cost-2026-08-24 in this header.

Parameters:

  • (::Array[Anthropic::Models::anthropic_beta])

Returns:



286
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 286

optional :betas, -> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::AnthropicBeta] }

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



65
66
67
68
69
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 65

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)


78
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 78

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:



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

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

#deployment_ids ⇒ Array<String>?

Filter to usage incurred by Claude Managed Agents sessions that specific deployments started. Use group_by[]=deployment_id to break out per-deployment values.

Parameters:

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

Returns:

  • (Array<String>, nil)


97
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 97

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

#ending_at ⇒ Time?

End of range, exclusive. Required when time_bucket_width is set. Without time_bucket_width, 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)


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

optional :ending_at, Time, nil?: true

#environment_ids ⇒ Array<String>?

Filter to usage incurred by Claude Managed Agents sessions that ran in specific environments. Use group_by[]=environment_id to break out per-environment values.

Parameters:

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

Returns:

  • (Array<String>, nil)


113
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 113

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

#exclude_deleted_users ⇒ Boolean?

If true, omit rows whose actor is a user_actor with deleted: true. Requires group_by[]=actor. Rows for other actor types, and rows whose actor is null, are always kept. A page may contain fewer than limit rows; use has_more and next_page to paginate as usual.

Parameters:

Returns:



122
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 122

optional :exclude_deleted_users, Anthropic::Internal::Type::Boolean

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

Dimensions to break usage out by (at most 5): one row per combination of their values with usage in the range (and per time bucket, when time_bucket_width is set), every combination returned across pages rather than a capped top set. When omitted, a single row aggregates the whole range.

Parameters:

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

Returns:



131
132
133
134
135
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 131

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



142
143
144
145
146
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 142

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). cost_type/token_type fan-out rows (cost endpoint only) do not count toward this limit, so data can exceed it.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


154
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 154

optional :limit, Integer

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


161
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 161

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

#order ⇒ Symbol, ...

Sort direction of the order_by metric, or of the time buckets when order_by is time and time_bucket_width is set. Defaults to desc.

Parameters:

  • (Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_sort_order)

Returns:



168
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 168

optional :order, enum: -> { Anthropic::Beta::Organization::BetaAnalyticsUsageCostSortOrder }

#order_by ⇒ Symbol, ...

Row order. A metric ranks rows by that metric in the order direction. time orders rows by time bucket in the order direction (newest first by default) and, within a bucket, by total_tokens, highest first. time takes effect only with time_bucket_width; without it, time is the same as total_tokens. Defaults to total_tokens.

Parameters:

  • (Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_order_by)

Returns:



178
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 178

optional :order_by, enum: -> { Anthropic::Beta::Organization::Analytics::BetaAnalyticsUsageOrderBy }

#organization_ids ⇒ Array<String>?

Filter a parent organization's report to specific child organizations, by organization UUID or org_ ID; an ID that is not one of its child organizations matches nothing. The report leaves out child organizations with HIPAA readiness enabled, and naming one returns a 400 error. Requires an API key created at the parent organization level. Use group_by[]=organization_id to break out per-organization values.

Parameters:

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

Returns:

  • (Array<String>, nil)


189
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 189

optional :organization_ids, 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)


195
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 195

optional :page, String, nil?: true

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

Product surfaces to include. Defaults to all products.

Parameters:

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

Returns:



201
202
203
204
205
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 201

optional :products,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsUsageCostProductFilter]
},
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)


214
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 214

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

#service_tiers ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsServiceTier>?

Filter to specific service tiers. Use group_by[]=service_tier to break out per-tier values.

Parameters:

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

Returns:



221
222
223
224
225
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 221

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

#session_ids ⇒ Array<String>?

Filter to usage incurred by specific Claude Managed Agents sessions, by tagged session ID (sesn_...). Use group_by[]=session_id to break out per-session values.

Parameters:

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

Returns:

  • (Array<String>, nil)


233
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 233

optional :session_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)


240
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 240

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

#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsSpeed>?

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

Parameters:

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

Returns:



247
248
249
250
251
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 247

optional :speeds,
-> {
  Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsSpeed]
},
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_list_params.rb', line 18

required :starting_at, Time

#time_bucket_width ⇒ Symbol, ...

Time-bucket granularity. When set, rows are returned per time bucket (one per bucket and dimension combination with usage) and each row's starting_at and ending_at are that bucket's bounds; the time bucket counts toward limit. ending_at is required when time_bucket_width is set, and with time_bucket_width="1m" the range may span at most 24 hours. When omitted, each row aggregates the requested range with starting_at and ending_at each rounded down to the hour.

Parameters:

  • value (Anthropic::Models::Beta::Organization::beta_analytics_time_bucket_width, nil)

Returns:



263
264
265
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 263

optional :time_bucket_width,
enum: -> { Anthropic::Beta::Organization::BetaAnalyticsTimeBucketWidth },
nil?: true

#user_profile_ids ⇒ Array<String>?

Filter to usage attributed to specific user profiles, by tagged user profile ID (uprof_...). Use group_by[]=user_profile_id to break out per-profile values.

Parameters:

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

Returns:

  • (Array<String>, nil)


272
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 272

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

#workspace_ids ⇒ Array<String>?

Filter to usage in specific workspaces, by tagged workspace ID (wrkspc_...). Use group_by[]=workspace_id to break out per-workspace values.

Parameters:

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

Returns:

  • (Array<String>, nil)


279
# File 'lib/anthropic/models/beta/organization/analytics/usage_list_params.rb', line 279

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

Instance Method Details

#to_hash ⇒ { starting_at: Time, actor_ids: ::Array[String]?, actor_types: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_actor_type]?, agent_ids: ::Array[String]?, api_key_ids: ::Array[String]?, claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?, claude_tag_user_ids: ::Array[String]?, context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?, deployment_ids: ::Array[String]?, ending_at: Time?, environment_ids: ::Array[String]?, exclude_deleted_users: bool, group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_group_by]?, inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?, limit: Integer, models: ::Array[String]?, order: Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_sort_order, order_by: Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_order_by, organization_ids: ::Array[String]?, page: String?, products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_product_filter]?, rbac_group_ids: ::Array[String]?, service_tiers: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_service_tier]?, session_ids: ::Array[String]?, slack_channel_ids: ::Array[String]?, speeds: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_speed]?, time_bucket_width: Anthropic::Models::Beta::Organization::beta_analytics_time_bucket_width?, user_profile_ids: ::Array[String]?, workspace_ids: ::Array[String]?, betas: ::Array[Anthropic::Models::anthropic_beta], request_options: Anthropic::RequestOptions }

Returns:

  • ({ starting_at: Time, actor_ids: ::Array[String]?, actor_types: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_actor_type]?, agent_ids: ::Array[String]?, api_key_ids: ::Array[String]?, claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?, claude_tag_user_ids: ::Array[String]?, context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?, deployment_ids: ::Array[String]?, ending_at: Time?, environment_ids: ::Array[String]?, exclude_deleted_users: bool, group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_group_by]?, inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?, limit: Integer, models: ::Array[String]?, order: Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_sort_order, order_by: Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_order_by, organization_ids: ::Array[String]?, page: String?, products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_product_filter]?, rbac_group_ids: ::Array[String]?, service_tiers: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_service_tier]?, session_ids: ::Array[String]?, slack_channel_ids: ::Array[String]?, speeds: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_speed]?, time_bucket_width: Anthropic::Models::Beta::Organization::beta_analytics_time_bucket_width?, user_profile_ids: ::Array[String]?, workspace_ids: ::Array[String]?, betas: ::Array[Anthropic::Models::anthropic_beta], request_options: Anthropic::RequestOptions })


155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# File 'sig/anthropic/models/beta/organization/analytics/usage_list_params.rbs', line 155

def to_hash: -> {
  starting_at: Time,
  actor_ids: ::Array[String]?,
  actor_types: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_actor_type]?,
  agent_ids: ::Array[String]?,
  api_key_ids: ::Array[String]?,
  claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?,
  claude_tag_user_ids: ::Array[String]?,
  context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?,
  deployment_ids: ::Array[String]?,
  ending_at: Time?,
  environment_ids: ::Array[String]?,
  exclude_deleted_users: bool,
  group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_group_by]?,
  inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?,
  limit: Integer,
  models: ::Array[String]?,
  order: Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_sort_order,
  order_by: Anthropic::Models::Beta::Organization::Analytics::beta_analytics_usage_order_by,
  organization_ids: ::Array[String]?,
  page: String?,
  products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_usage_cost_product_filter]?,
  rbac_group_ids: ::Array[String]?,
  service_tiers: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_service_tier]?,
  session_ids: ::Array[String]?,
  slack_channel_ids: ::Array[String]?,
  speeds: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_speed]?,
  time_bucket_width: Anthropic::Models::Beta::Organization::beta_analytics_time_bucket_width?,
  user_profile_ids: ::Array[String]?,
  workspace_ids: ::Array[String]?,
  betas: ::Array[Anthropic::Models::anthropic_beta],
  request_options: Anthropic::RequestOptions
}