class Vellum::AsyncWorkflowDeploymentsClient
def initialize(request_client:)
-
(AsyncWorkflowDeploymentsClient)-
Parameters:
-
request_client(AsyncRequestClient) --
def initialize(request_client:) # @type [AsyncRequestClient] @request_client = request_client end
def list(limit: nil, offset: nil, ordering: nil, status: nil, request_options: nil)
-
(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) Async do 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 end
def retrieve(id:, request_options: nil)
-
(WorkflowDeploymentRead)-
Parameters:
-
request_options(RequestOptions) -- -
id(String) -- Either the Workflow Deployment's ID or its unique name
def retrieve(id:, request_options: nil) Async do 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 end