Class: Anthropic::Resources::Beta::Agents::Versions
- Inherits:
-
Object
- Object
- Anthropic::Resources::Beta::Agents::Versions
- Defined in:
- lib/anthropic/resources/beta/agents/versions.rb,
sig/anthropic/resources/beta/agents/versions.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Versions
constructor
private
A new instance of Versions.
-
#list(agent_id, limit: nil, page: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaManagedAgentsAgent>
List Agent Versions.
Constructor Details
#initialize(client:) ⇒ Versions
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 Versions.
51 52 53 |
# File 'lib/anthropic/resources/beta/agents/versions.rb', line 51 def initialize(client:) @client = client end |
Instance Method Details
#list(agent_id, limit: nil, page: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaManagedAgentsAgent>
List Agent Versions
Some parameter documentations has been truncated, see Models::Beta::Agents::VersionListParams for more details.
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/anthropic/resources/beta/agents/versions.rb', line 30 def list(agent_id, params = {}) query_params = [:limit, :page] parsed, = Anthropic::Beta::Agents::VersionListParams.dump_request(params) query = Anthropic::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["v1/agents/%1$s/versions?beta=true", agent_id], query: query, headers: parsed.except(*query_params).transform_keys( betas: "anthropic-beta", workspace_id: "anthropic-workspace-id" ), page: Anthropic::Internal::PageCursor, model: Anthropic::Beta::BetaManagedAgentsAgent, options: {extra_headers: {"anthropic-beta" => "managed-agents-2026-04-01"}, **} ) end |