Class: Anthropic::Resources::Beta::Organization::Workspaces::RateLimits

Inherits:
Object
  • Object
show all
Defined in:
lib/anthropic/resources/beta/organization/workspaces/rate_limits.rb,
sig/anthropic/resources/beta/organization/workspaces/rate_limits.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ RateLimits

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of RateLimits.

Parameters:



54
55
56
# File 'lib/anthropic/resources/beta/organization/workspaces/rate_limits.rb', line 54

def initialize(client:)
  @client = client
end

Instance Method Details

#list(workspace_id, group_type: nil, limit: nil, page: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::Workspaces::BetaWorkspaceRateLimit>

List rate-limit overrides configured for a workspace.

Returns only the groups and limiter types that have a workspace-level override. Groups without overrides inherit the organization limits and are not listed; use GET /v1/organizations/rate_limits to see those.

This endpoint currently returns every matching entry in a single page regardless of limit; follow next_page so that clients keep working when pagination is enabled.

Some parameter documentations has been truncated, see Models::Beta::Organization::Workspaces::RateLimitListParams for more details.

Parameters:

Returns:

See Also:



38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/anthropic/resources/beta/organization/workspaces/rate_limits.rb', line 38

def list(workspace_id, params = {})
  parsed, options = Anthropic::Beta::Organization::Workspaces::RateLimitListParams.dump_request(params)
  query = Anthropic::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["v1/organizations/workspaces/%1$s/rate_limits?beta=true", workspace_id],
    query: query,
    page: Anthropic::Internal::PageCursor,
    model: Anthropic::Beta::Organization::Workspaces::BetaWorkspaceRateLimit,
    options: options
  )
end