class Vellum::WorkflowDeploymentsClient

def initialize(request_client:)

Returns:
  • (WorkflowDeploymentsClient) -

Parameters:
  • request_client (RequestClient) --
def initialize(request_client:)
  # @type [RequestClient]
  @request_client = request_client
end

def list(limit: nil, offset: nil, ordering: nil, status: nil, request_options: nil)

Returns:
  • (PaginatedSlimWorkflowDeploymentList) -

Parameters:
  • request_options (RequestOptions) --
  • status (WORKFLOW_DEPLOYMENTS_LIST_REQUEST_STATUS) -- status
  • ordering (String) -- Which field to use when ordering the results.
  • offset (Integer) -- The initial index from which to return the results.
  • limit (Integer) -- Number of results to return per page.
def list(limit: nil, offset: nil, ordering: nil, status: nil, request_options: nil)
  response = @request_client.conn.get do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["X_API_KEY"] = request_options.api_key unless request_options&.api_key.nil?
    req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
    req.params = {
      **(request_options&.additional_query_parameters || {}),
      "limit": limit,
      "offset": offset,
      "ordering": ordering,
      "status": status
    }.compact
    req.url "#{@request_client.default_environment[:Default]}/v1/workflow-deployments"
  end
  PaginatedSlimWorkflowDeploymentList.from_json(json_object: response.body)
end

def retrieve(id:, request_options: nil)

Returns:
  • (WorkflowDeploymentRead) -

Parameters:
  • request_options (RequestOptions) --
  • id (String) -- Either the Workflow Deployment's ID or its unique name
def retrieve(id:, request_options: nil)
  response = @request_client.conn.get do |req|
    req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
    req.headers["X_API_KEY"] = request_options.api_key unless request_options&.api_key.nil?
    req.headers = { **req.headers, **(request_options&.additional_headers || {}) }.compact
    req.url "#{@request_client.default_environment[:Default]}/v1/workflow-deployments/#{id}"
  end
  WorkflowDeploymentRead.from_json(json_object: response.body)
end