Class: Vellum::WorkflowSandboxesClient
- Inherits:
-
Object
- Object
- Vellum::WorkflowSandboxesClient
- Defined in:
- lib/vellum_ai/workflow_sandboxes/client.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#deploy_workflow(id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.deploy_workflow(id: “id”).
- #initialize(request_client:) ⇒ Vellum::WorkflowSandboxesClient constructor
-
#list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.list_workflow_sandbox_examples.
Constructor Details
#initialize(request_client:) ⇒ Vellum::WorkflowSandboxesClient
18 19 20 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 18 def initialize(request_client:) @request_client = request_client end |
Instance Attribute Details
#request_client ⇒ Vellum::RequestClient (readonly)
13 14 15 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 13 def request_client @request_client end |
Instance Method Details
#deploy_workflow(id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.deploy_workflow(id: “id”)
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 43 def deploy_workflow(id:, workflow_deployment_id: nil, workflow_deployment_name: nil, label: nil, release_tags: nil, release_description: nil, request_options: nil) response = @request_client.conn.post do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact unless .nil? || &.additional_query_parameters.nil? req.params = { **(&.additional_query_parameters || {}) }.compact end req.body = { **(&.additional_body_parameters || {}), workflow_deployment_id: workflow_deployment_id, workflow_deployment_name: workflow_deployment_name, label: label, release_tags: , release_description: release_description }.compact req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/workflow-sandboxes/#{id}/deploy" end Vellum::WorkflowDeploymentRead.from_json(json_object: response.body) end |
#list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil) ⇒ Object
api.workflow_sandboxes.list_workflow_sandbox_examples
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/vellum_ai/workflow_sandboxes/client.rb', line 81 def list_workflow_sandbox_examples(limit: nil, offset: nil, ordering: nil, tag: nil, request_options: nil) response = @request_client.conn.get do | req | unless &.timeout_in_seconds.nil? req..timeout = .timeout_in_seconds end unless &.api_key.nil? req.headers["X-API-KEY"] = .api_key end unless &.api_version.nil? req.headers["X-API-Version"] = .api_version else req.headers["X-API-Version"] = "2025-07-30" end req.headers = { **(req.headers || {}), **@request_client.get_headers, **(&.additional_headers || {}) }.compact req.params = { **(&.additional_query_parameters || {}), "limit": limit, "offset": offset, "ordering": ordering, "tag": tag }.compact unless .nil? || &.additional_body_parameters.nil? req.body = { **(&.additional_body_parameters || {}) }.compact end req.url "#{@request_client.get_url(environment: Default, request_options: )}/v1/workflow-sandboxes/examples" end Vellum::PaginatedWorkflowSandboxExampleList.from_json(json_object: response.body) end |