Class: Anthropic::Resources::Beta::DeploymentRuns

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DeploymentRuns

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

Parameters:



107
108
109
# File 'lib/anthropic/resources/beta/deployment_runs.rb', line 107

def initialize(client:)
  @client = client
end

Instance Method Details

#list(created_at_gt: nil, created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, deployment_id: nil, has_error: nil, limit: nil, page: nil, trigger_type: nil, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaManagedAgentsDeploymentRun>

List Deployment Runs

Some parameter documentations has been truncated, see Models::Beta::DeploymentRunListParams for more details.

Parameters:

  • created_at_gt (Time)

    Query param: Return runs created strictly after this time (exclusive).

  • created_at_gte (Time)

    Query param: Return runs created at or after this time (inclusive).

  • created_at_lt (Time)

    Query param: Return runs created strictly before this time (exclusive).

  • created_at_lte (Time)

    Query param: Return runs created at or before this time (inclusive).

  • deployment_id (String)

    Query param: Filter to a specific deployment. Omit to list across all deployment

  • has_error (Boolean)

    Query param: Filter: true for runs with non-null error, false for runs with no

  • limit (Integer)

    Query param: Maximum results per page. Default 20, maximum 1000.

  • page (String)

    Query param: Opaque pagination cursor. Pass next_page from the previous respon

  • trigger_type (Symbol, Anthropic::Models::Beta::BetaManagedAgentsTriggerType)

    Query param: Filter runs by what triggered them. Omit to return all runs.

  • betas (Array<String, Symbol, Anthropic::Models::AnthropicBeta>)

    Header param: Optional header to specify the beta version(s) you want to use.

  • workspace_id (String)

    Header param: Optional header to select the Workspace for this request. The valu

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/anthropic/resources/beta/deployment_runs.rb', line 70

def list(params = {})
  query_params =
    [
      :created_at_gt,
      :created_at_gte,
      :created_at_lt,
      :created_at_lte,
      :deployment_id,
      :has_error,
      :limit,
      :page,
      :trigger_type
    ]
  parsed, options = Anthropic::Beta::DeploymentRunListParams.dump_request(params)
  query = Anthropic::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :get,
    path: "v1/deployment_runs?beta=true",
    query: query.transform_keys(
      created_at_gt: "created_at[gt]",
      created_at_gte: "created_at[gte]",
      created_at_lt: "created_at[lt]",
      created_at_lte: "created_at[lte]"
    ),
    headers: parsed.except(*query_params).transform_keys(
      betas: "anthropic-beta",
      workspace_id: "anthropic-workspace-id"
    ),
    page: Anthropic::Internal::PageCursor,
    model: Anthropic::Beta::BetaManagedAgentsDeploymentRun,
    options: {extra_headers: {"anthropic-beta" => "managed-agents-2026-04-01"}, **options}
  )
end

#retrieve(deployment_run_id, betas: nil, workspace_id: nil, request_options: {}) ⇒ Anthropic::Models::Beta::BetaManagedAgentsDeploymentRun

Get Deployment Run

Some parameter documentations has been truncated, see Models::Beta::DeploymentRunRetrieveParams for more details.

Parameters:

  • deployment_run_id (String)

    Path parameter deployment_run_id

  • betas (Array<String, Symbol, Anthropic::Models::AnthropicBeta>)

    Optional header to specify the beta version(s) you want to use.

  • workspace_id (String)

    Optional header to select the Workspace for this request. The value is a Workspa

  • request_options (Anthropic::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
# File 'lib/anthropic/resources/beta/deployment_runs.rb', line 25

def retrieve(deployment_run_id, params = {})
  parsed, options = Anthropic::Beta::DeploymentRunRetrieveParams.dump_request(params)
  @client.request(
    method: :get,
    path: ["v1/deployment_runs/%1$s?beta=true", deployment_run_id],
    headers: parsed.transform_keys(betas: "anthropic-beta", workspace_id: "anthropic-workspace-id"),
    model: Anthropic::Beta::BetaManagedAgentsDeploymentRun,
    options: {extra_headers: {"anthropic-beta" => "managed-agents-2026-04-01"}, **options}
  )
end