nightona_toolbox_api_client 0.191.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +113 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +13 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Rakefile +10 -0
- data/fix-gemspec.sh +13 -0
- data/lib/nightona_toolbox_api_client/api/computer_use_api.rb +2179 -0
- data/lib/nightona_toolbox_api_client/api/file_system_api.rb +893 -0
- data/lib/nightona_toolbox_api_client/api/git_api.rb +744 -0
- data/lib/nightona_toolbox_api_client/api/info_api.rb +193 -0
- data/lib/nightona_toolbox_api_client/api/interpreter_api.rb +267 -0
- data/lib/nightona_toolbox_api_client/api/lsp_api.rb +510 -0
- data/lib/nightona_toolbox_api_client/api/port_api.rb +142 -0
- data/lib/nightona_toolbox_api_client/api/process_api.rb +1201 -0
- data/lib/nightona_toolbox_api_client/api/server_api.rb +85 -0
- data/lib/nightona_toolbox_api_client/api_client.rb +397 -0
- data/lib/nightona_toolbox_api_client/api_error.rb +58 -0
- data/lib/nightona_toolbox_api_client/api_model_base.rb +88 -0
- data/lib/nightona_toolbox_api_client/configuration.rb +308 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_bounds.rb +174 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_invoke_request.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_node_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_nodes_response.rb +158 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_set_value_request.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/accessibility_tree_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/chart.rb +256 -0
- data/lib/nightona_toolbox_api_client/models/chart_element.rb +295 -0
- data/lib/nightona_toolbox_api_client/models/code_run_artifacts.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/code_run_request.rb +222 -0
- data/lib/nightona_toolbox_api_client/models/code_run_response.rb +165 -0
- data/lib/nightona_toolbox_api_client/models/command.rb +199 -0
- data/lib/nightona_toolbox_api_client/models/completion_context.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/completion_item.rb +218 -0
- data/lib/nightona_toolbox_api_client/models/completion_list.rb +192 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_accessibility_node.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_start_response.rb +158 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_status_response.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/computer_use_stop_response.rb +158 -0
- data/lib/nightona_toolbox_api_client/models/create_context_request.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/create_session_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/display_info.rb +192 -0
- data/lib/nightona_toolbox_api_client/models/display_info_response.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/execute_request.rb +196 -0
- data/lib/nightona_toolbox_api_client/models/execute_response.rb +173 -0
- data/lib/nightona_toolbox_api_client/models/file_info.rb +373 -0
- data/lib/nightona_toolbox_api_client/models/file_status.rb +264 -0
- data/lib/nightona_toolbox_api_client/models/files_download_request.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/find_accessibility_nodes_request.rb +204 -0
- data/lib/nightona_toolbox_api_client/models/git_add_request.rb +193 -0
- data/lib/nightona_toolbox_api_client/models/git_branch_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/git_checkout_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/git_clone_request.rb +236 -0
- data/lib/nightona_toolbox_api_client/models/git_commit_info.rb +268 -0
- data/lib/nightona_toolbox_api_client/models/git_commit_request.rb +251 -0
- data/lib/nightona_toolbox_api_client/models/git_commit_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/git_delete_branch_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/git_repo_request.rb +182 -0
- data/lib/nightona_toolbox_api_client/models/git_status.rb +219 -0
- data/lib/nightona_toolbox_api_client/models/initialize_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/interpreter_context.rb +268 -0
- data/lib/nightona_toolbox_api_client/models/is_port_in_use_response.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/keyboard_hotkey_request.rb +148 -0
- data/lib/nightona_toolbox_api_client/models/keyboard_press_request.rb +159 -0
- data/lib/nightona_toolbox_api_client/models/keyboard_type_request.rb +157 -0
- data/lib/nightona_toolbox_api_client/models/list_branch_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/list_contexts_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/list_recordings_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/lsp_completion_params.rb +251 -0
- data/lib/nightona_toolbox_api_client/models/lsp_document_request.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/lsp_location.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_position.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_range.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_server_request.rb +190 -0
- data/lib/nightona_toolbox_api_client/models/lsp_symbol.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/match.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/mouse_click_request.rb +175 -0
- data/lib/nightona_toolbox_api_client/models/mouse_click_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_drag_request.rb +183 -0
- data/lib/nightona_toolbox_api_client/models/mouse_drag_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_move_request.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_position_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/mouse_scroll_request.rb +194 -0
- data/lib/nightona_toolbox_api_client/models/port_list.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/position.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_errors_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_logs_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_restart_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/process_status.rb +174 -0
- data/lib/nightona_toolbox_api_client/models/process_status_response.rb +156 -0
- data/lib/nightona_toolbox_api_client/models/pty_create_request.rb +195 -0
- data/lib/nightona_toolbox_api_client/models/pty_create_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/pty_list_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/pty_resize_request.rb +226 -0
- data/lib/nightona_toolbox_api_client/models/pty_session_info.rb +349 -0
- data/lib/nightona_toolbox_api_client/models/recording.rb +295 -0
- data/lib/nightona_toolbox_api_client/models/replace_request.rb +218 -0
- data/lib/nightona_toolbox_api_client/models/replace_result.rb +165 -0
- data/lib/nightona_toolbox_api_client/models/screenshot_response.rb +165 -0
- data/lib/nightona_toolbox_api_client/models/scroll_response.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/search_files_response.rb +166 -0
- data/lib/nightona_toolbox_api_client/models/session.rb +192 -0
- data/lib/nightona_toolbox_api_client/models/session_command_logs_response.rb +216 -0
- data/lib/nightona_toolbox_api_client/models/session_execute_request.rb +191 -0
- data/lib/nightona_toolbox_api_client/models/session_execute_response.rb +200 -0
- data/lib/nightona_toolbox_api_client/models/session_send_input_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/start_recording_request.rb +147 -0
- data/lib/nightona_toolbox_api_client/models/status.rb +47 -0
- data/lib/nightona_toolbox_api_client/models/stop_recording_request.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/user_home_dir_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/models/window_info.rb +201 -0
- data/lib/nightona_toolbox_api_client/models/windows_response.rb +149 -0
- data/lib/nightona_toolbox_api_client/models/work_dir_response.rb +164 -0
- data/lib/nightona_toolbox_api_client/version.rb +15 -0
- data/lib/nightona_toolbox_api_client.rb +142 -0
- data/nightona_toolbox_api_client.gemspec +39 -0
- data/project.json +71 -0
- metadata +200 -0
|
@@ -0,0 +1,1201 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Nightona Toolbox API
|
|
3
|
+
|
|
4
|
+
#Nightona Toolbox API. The base URL comes from the sandbox's `toolboxProxyUrl` field (returned in sandbox DTO by the main Nightona API) plus the sandbox ID: `{toolboxProxyUrl}/{sandboxId}/{endpoint}`. Default for Nightona Cloud: `https://proxy.app.daytona.io/toolbox/{sandboxId}`.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v0.0.0-dev
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module NightonaToolboxApiClient
|
|
16
|
+
class ProcessApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Execute code
|
|
23
|
+
# Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts
|
|
24
|
+
# @param request [CodeRunRequest] Code execution request
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CodeRunResponse]
|
|
27
|
+
def code_run(request, opts = {})
|
|
28
|
+
data, _status_code, _headers = code_run_with_http_info(request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Execute code
|
|
33
|
+
# Execute Python, JavaScript, or TypeScript code and return output, exit code, and artifacts
|
|
34
|
+
# @param request [CodeRunRequest] Code execution request
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CodeRunResponse, Integer, Hash)>] CodeRunResponse data, response status code and response headers
|
|
37
|
+
def code_run_with_http_info(request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.code_run ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.code_run"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/process/code-run'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CodeRunResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || []
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"ProcessApi.code_run",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: ProcessApi#code_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Connect to PTY session via WebSocket
|
|
91
|
+
# Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
92
|
+
# @param session_id [String] PTY session ID
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def connect_pty_session(session_id, opts = {})
|
|
96
|
+
connect_pty_session_with_http_info(session_id, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Connect to PTY session via WebSocket
|
|
101
|
+
# Establish a WebSocket connection to interact with a pseudo-terminal session
|
|
102
|
+
# @param session_id [String] PTY session ID
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
105
|
+
def connect_pty_session_with_http_info(session_id, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.connect_pty_session ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'session_id' is set
|
|
110
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.connect_pty_session"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/process/pty/{sessionId}/connect'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
|
|
122
|
+
# form parameters
|
|
123
|
+
form_params = opts[:form_params] || {}
|
|
124
|
+
|
|
125
|
+
# http body (model)
|
|
126
|
+
post_body = opts[:debug_body]
|
|
127
|
+
|
|
128
|
+
# return_type
|
|
129
|
+
return_type = opts[:debug_return_type]
|
|
130
|
+
|
|
131
|
+
# auth_names
|
|
132
|
+
auth_names = opts[:debug_auth_names] || []
|
|
133
|
+
|
|
134
|
+
new_options = opts.merge(
|
|
135
|
+
:operation => :"ProcessApi.connect_pty_session",
|
|
136
|
+
:header_params => header_params,
|
|
137
|
+
:query_params => query_params,
|
|
138
|
+
:form_params => form_params,
|
|
139
|
+
:body => post_body,
|
|
140
|
+
:auth_names => auth_names,
|
|
141
|
+
:return_type => return_type
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
145
|
+
if @api_client.config.debugging
|
|
146
|
+
@api_client.config.logger.debug "API called: ProcessApi#connect_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
147
|
+
end
|
|
148
|
+
return data, status_code, headers
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Create a new PTY session
|
|
152
|
+
# Create a new pseudo-terminal session with specified configuration
|
|
153
|
+
# @param request [PtyCreateRequest] PTY session creation request
|
|
154
|
+
# @param [Hash] opts the optional parameters
|
|
155
|
+
# @return [PtyCreateResponse]
|
|
156
|
+
def create_pty_session(request, opts = {})
|
|
157
|
+
data, _status_code, _headers = create_pty_session_with_http_info(request, opts)
|
|
158
|
+
data
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Create a new PTY session
|
|
162
|
+
# Create a new pseudo-terminal session with specified configuration
|
|
163
|
+
# @param request [PtyCreateRequest] PTY session creation request
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @return [Array<(PtyCreateResponse, Integer, Hash)>] PtyCreateResponse data, response status code and response headers
|
|
166
|
+
def create_pty_session_with_http_info(request, opts = {})
|
|
167
|
+
if @api_client.config.debugging
|
|
168
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.create_pty_session ...'
|
|
169
|
+
end
|
|
170
|
+
# verify the required parameter 'request' is set
|
|
171
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
172
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.create_pty_session"
|
|
173
|
+
end
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = '/process/pty'
|
|
176
|
+
|
|
177
|
+
# query parameters
|
|
178
|
+
query_params = opts[:query_params] || {}
|
|
179
|
+
|
|
180
|
+
# header parameters
|
|
181
|
+
header_params = opts[:header_params] || {}
|
|
182
|
+
# HTTP header 'Accept' (if needed)
|
|
183
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
184
|
+
# HTTP header 'Content-Type'
|
|
185
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
186
|
+
if !content_type.nil?
|
|
187
|
+
header_params['Content-Type'] = content_type
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# form parameters
|
|
191
|
+
form_params = opts[:form_params] || {}
|
|
192
|
+
|
|
193
|
+
# http body (model)
|
|
194
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
195
|
+
|
|
196
|
+
# return_type
|
|
197
|
+
return_type = opts[:debug_return_type] || 'PtyCreateResponse'
|
|
198
|
+
|
|
199
|
+
# auth_names
|
|
200
|
+
auth_names = opts[:debug_auth_names] || []
|
|
201
|
+
|
|
202
|
+
new_options = opts.merge(
|
|
203
|
+
:operation => :"ProcessApi.create_pty_session",
|
|
204
|
+
:header_params => header_params,
|
|
205
|
+
:query_params => query_params,
|
|
206
|
+
:form_params => form_params,
|
|
207
|
+
:body => post_body,
|
|
208
|
+
:auth_names => auth_names,
|
|
209
|
+
:return_type => return_type
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
213
|
+
if @api_client.config.debugging
|
|
214
|
+
@api_client.config.logger.debug "API called: ProcessApi#create_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
215
|
+
end
|
|
216
|
+
return data, status_code, headers
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Create a new session
|
|
220
|
+
# Create a new shell session for command execution
|
|
221
|
+
# @param request [CreateSessionRequest] Session creation request
|
|
222
|
+
# @param [Hash] opts the optional parameters
|
|
223
|
+
# @return [nil]
|
|
224
|
+
def create_session(request, opts = {})
|
|
225
|
+
create_session_with_http_info(request, opts)
|
|
226
|
+
nil
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Create a new session
|
|
230
|
+
# Create a new shell session for command execution
|
|
231
|
+
# @param request [CreateSessionRequest] Session creation request
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
234
|
+
def create_session_with_http_info(request, opts = {})
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.create_session ...'
|
|
237
|
+
end
|
|
238
|
+
# verify the required parameter 'request' is set
|
|
239
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.create_session"
|
|
241
|
+
end
|
|
242
|
+
# resource path
|
|
243
|
+
local_var_path = '/process/session'
|
|
244
|
+
|
|
245
|
+
# query parameters
|
|
246
|
+
query_params = opts[:query_params] || {}
|
|
247
|
+
|
|
248
|
+
# header parameters
|
|
249
|
+
header_params = opts[:header_params] || {}
|
|
250
|
+
# HTTP header 'Content-Type'
|
|
251
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
252
|
+
if !content_type.nil?
|
|
253
|
+
header_params['Content-Type'] = content_type
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# form parameters
|
|
257
|
+
form_params = opts[:form_params] || {}
|
|
258
|
+
|
|
259
|
+
# http body (model)
|
|
260
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
261
|
+
|
|
262
|
+
# return_type
|
|
263
|
+
return_type = opts[:debug_return_type]
|
|
264
|
+
|
|
265
|
+
# auth_names
|
|
266
|
+
auth_names = opts[:debug_auth_names] || []
|
|
267
|
+
|
|
268
|
+
new_options = opts.merge(
|
|
269
|
+
:operation => :"ProcessApi.create_session",
|
|
270
|
+
:header_params => header_params,
|
|
271
|
+
:query_params => query_params,
|
|
272
|
+
:form_params => form_params,
|
|
273
|
+
:body => post_body,
|
|
274
|
+
:auth_names => auth_names,
|
|
275
|
+
:return_type => return_type
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
279
|
+
if @api_client.config.debugging
|
|
280
|
+
@api_client.config.logger.debug "API called: ProcessApi#create_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
281
|
+
end
|
|
282
|
+
return data, status_code, headers
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Delete a PTY session
|
|
286
|
+
# Delete a pseudo-terminal session and terminate its process
|
|
287
|
+
# @param session_id [String] PTY session ID
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @return [Hash<String, Object>]
|
|
290
|
+
def delete_pty_session(session_id, opts = {})
|
|
291
|
+
data, _status_code, _headers = delete_pty_session_with_http_info(session_id, opts)
|
|
292
|
+
data
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Delete a PTY session
|
|
296
|
+
# Delete a pseudo-terminal session and terminate its process
|
|
297
|
+
# @param session_id [String] PTY session ID
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @return [Array<(Hash<String, Object>, Integer, Hash)>] Hash<String, Object> data, response status code and response headers
|
|
300
|
+
def delete_pty_session_with_http_info(session_id, opts = {})
|
|
301
|
+
if @api_client.config.debugging
|
|
302
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.delete_pty_session ...'
|
|
303
|
+
end
|
|
304
|
+
# verify the required parameter 'session_id' is set
|
|
305
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
306
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.delete_pty_session"
|
|
307
|
+
end
|
|
308
|
+
# resource path
|
|
309
|
+
local_var_path = '/process/pty/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
310
|
+
|
|
311
|
+
# query parameters
|
|
312
|
+
query_params = opts[:query_params] || {}
|
|
313
|
+
|
|
314
|
+
# header parameters
|
|
315
|
+
header_params = opts[:header_params] || {}
|
|
316
|
+
# HTTP header 'Accept' (if needed)
|
|
317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
318
|
+
|
|
319
|
+
# form parameters
|
|
320
|
+
form_params = opts[:form_params] || {}
|
|
321
|
+
|
|
322
|
+
# http body (model)
|
|
323
|
+
post_body = opts[:debug_body]
|
|
324
|
+
|
|
325
|
+
# return_type
|
|
326
|
+
return_type = opts[:debug_return_type] || 'Hash<String, Object>'
|
|
327
|
+
|
|
328
|
+
# auth_names
|
|
329
|
+
auth_names = opts[:debug_auth_names] || []
|
|
330
|
+
|
|
331
|
+
new_options = opts.merge(
|
|
332
|
+
:operation => :"ProcessApi.delete_pty_session",
|
|
333
|
+
:header_params => header_params,
|
|
334
|
+
:query_params => query_params,
|
|
335
|
+
:form_params => form_params,
|
|
336
|
+
:body => post_body,
|
|
337
|
+
:auth_names => auth_names,
|
|
338
|
+
:return_type => return_type
|
|
339
|
+
)
|
|
340
|
+
|
|
341
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
342
|
+
if @api_client.config.debugging
|
|
343
|
+
@api_client.config.logger.debug "API called: ProcessApi#delete_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
344
|
+
end
|
|
345
|
+
return data, status_code, headers
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Delete a session
|
|
349
|
+
# Delete an existing shell session
|
|
350
|
+
# @param session_id [String] Session ID
|
|
351
|
+
# @param [Hash] opts the optional parameters
|
|
352
|
+
# @return [nil]
|
|
353
|
+
def delete_session(session_id, opts = {})
|
|
354
|
+
delete_session_with_http_info(session_id, opts)
|
|
355
|
+
nil
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Delete a session
|
|
359
|
+
# Delete an existing shell session
|
|
360
|
+
# @param session_id [String] Session ID
|
|
361
|
+
# @param [Hash] opts the optional parameters
|
|
362
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
363
|
+
def delete_session_with_http_info(session_id, opts = {})
|
|
364
|
+
if @api_client.config.debugging
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.delete_session ...'
|
|
366
|
+
end
|
|
367
|
+
# verify the required parameter 'session_id' is set
|
|
368
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.delete_session"
|
|
370
|
+
end
|
|
371
|
+
# resource path
|
|
372
|
+
local_var_path = '/process/session/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
373
|
+
|
|
374
|
+
# query parameters
|
|
375
|
+
query_params = opts[:query_params] || {}
|
|
376
|
+
|
|
377
|
+
# header parameters
|
|
378
|
+
header_params = opts[:header_params] || {}
|
|
379
|
+
|
|
380
|
+
# form parameters
|
|
381
|
+
form_params = opts[:form_params] || {}
|
|
382
|
+
|
|
383
|
+
# http body (model)
|
|
384
|
+
post_body = opts[:debug_body]
|
|
385
|
+
|
|
386
|
+
# return_type
|
|
387
|
+
return_type = opts[:debug_return_type]
|
|
388
|
+
|
|
389
|
+
# auth_names
|
|
390
|
+
auth_names = opts[:debug_auth_names] || []
|
|
391
|
+
|
|
392
|
+
new_options = opts.merge(
|
|
393
|
+
:operation => :"ProcessApi.delete_session",
|
|
394
|
+
:header_params => header_params,
|
|
395
|
+
:query_params => query_params,
|
|
396
|
+
:form_params => form_params,
|
|
397
|
+
:body => post_body,
|
|
398
|
+
:auth_names => auth_names,
|
|
399
|
+
:return_type => return_type
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
403
|
+
if @api_client.config.debugging
|
|
404
|
+
@api_client.config.logger.debug "API called: ProcessApi#delete_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
405
|
+
end
|
|
406
|
+
return data, status_code, headers
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Execute a command
|
|
410
|
+
# Execute a shell command and return the output and exit code
|
|
411
|
+
# @param request [ExecuteRequest] Command execution request
|
|
412
|
+
# @param [Hash] opts the optional parameters
|
|
413
|
+
# @return [ExecuteResponse]
|
|
414
|
+
def execute_command(request, opts = {})
|
|
415
|
+
data, _status_code, _headers = execute_command_with_http_info(request, opts)
|
|
416
|
+
data
|
|
417
|
+
end
|
|
418
|
+
|
|
419
|
+
# Execute a command
|
|
420
|
+
# Execute a shell command and return the output and exit code
|
|
421
|
+
# @param request [ExecuteRequest] Command execution request
|
|
422
|
+
# @param [Hash] opts the optional parameters
|
|
423
|
+
# @return [Array<(ExecuteResponse, Integer, Hash)>] ExecuteResponse data, response status code and response headers
|
|
424
|
+
def execute_command_with_http_info(request, opts = {})
|
|
425
|
+
if @api_client.config.debugging
|
|
426
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.execute_command ...'
|
|
427
|
+
end
|
|
428
|
+
# verify the required parameter 'request' is set
|
|
429
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
430
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.execute_command"
|
|
431
|
+
end
|
|
432
|
+
# resource path
|
|
433
|
+
local_var_path = '/process/execute'
|
|
434
|
+
|
|
435
|
+
# query parameters
|
|
436
|
+
query_params = opts[:query_params] || {}
|
|
437
|
+
|
|
438
|
+
# header parameters
|
|
439
|
+
header_params = opts[:header_params] || {}
|
|
440
|
+
# HTTP header 'Accept' (if needed)
|
|
441
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
442
|
+
# HTTP header 'Content-Type'
|
|
443
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
444
|
+
if !content_type.nil?
|
|
445
|
+
header_params['Content-Type'] = content_type
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
# form parameters
|
|
449
|
+
form_params = opts[:form_params] || {}
|
|
450
|
+
|
|
451
|
+
# http body (model)
|
|
452
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
453
|
+
|
|
454
|
+
# return_type
|
|
455
|
+
return_type = opts[:debug_return_type] || 'ExecuteResponse'
|
|
456
|
+
|
|
457
|
+
# auth_names
|
|
458
|
+
auth_names = opts[:debug_auth_names] || []
|
|
459
|
+
|
|
460
|
+
new_options = opts.merge(
|
|
461
|
+
:operation => :"ProcessApi.execute_command",
|
|
462
|
+
:header_params => header_params,
|
|
463
|
+
:query_params => query_params,
|
|
464
|
+
:form_params => form_params,
|
|
465
|
+
:body => post_body,
|
|
466
|
+
:auth_names => auth_names,
|
|
467
|
+
:return_type => return_type
|
|
468
|
+
)
|
|
469
|
+
|
|
470
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
471
|
+
if @api_client.config.debugging
|
|
472
|
+
@api_client.config.logger.debug "API called: ProcessApi#execute_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
473
|
+
end
|
|
474
|
+
return data, status_code, headers
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
# Get entrypoint logs
|
|
478
|
+
# Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.
|
|
479
|
+
# @param [Hash] opts the optional parameters
|
|
480
|
+
# @option opts [Boolean] :follow Follow logs in real-time (WebSocket only)
|
|
481
|
+
# @return [SessionCommandLogsResponse]
|
|
482
|
+
def get_entrypoint_logs(opts = {})
|
|
483
|
+
data, _status_code, _headers = get_entrypoint_logs_with_http_info(opts)
|
|
484
|
+
data
|
|
485
|
+
end
|
|
486
|
+
|
|
487
|
+
# Get entrypoint logs
|
|
488
|
+
# Get logs for a sandbox entrypoint session. Returns JSON with separated stdout/stderr for SDK >= 0.161.0, plain text otherwise. Supports WebSocket streaming.
|
|
489
|
+
# @param [Hash] opts the optional parameters
|
|
490
|
+
# @option opts [Boolean] :follow Follow logs in real-time (WebSocket only)
|
|
491
|
+
# @return [Array<(SessionCommandLogsResponse, Integer, Hash)>] SessionCommandLogsResponse data, response status code and response headers
|
|
492
|
+
def get_entrypoint_logs_with_http_info(opts = {})
|
|
493
|
+
if @api_client.config.debugging
|
|
494
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_entrypoint_logs ...'
|
|
495
|
+
end
|
|
496
|
+
# resource path
|
|
497
|
+
local_var_path = '/process/session/entrypoint/logs'
|
|
498
|
+
|
|
499
|
+
# query parameters
|
|
500
|
+
query_params = opts[:query_params] || {}
|
|
501
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
502
|
+
|
|
503
|
+
# header parameters
|
|
504
|
+
header_params = opts[:header_params] || {}
|
|
505
|
+
# HTTP header 'Accept' (if needed)
|
|
506
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) unless header_params['Accept']
|
|
507
|
+
|
|
508
|
+
# form parameters
|
|
509
|
+
form_params = opts[:form_params] || {}
|
|
510
|
+
|
|
511
|
+
# http body (model)
|
|
512
|
+
post_body = opts[:debug_body]
|
|
513
|
+
|
|
514
|
+
# return_type
|
|
515
|
+
return_type = opts[:debug_return_type] || 'SessionCommandLogsResponse'
|
|
516
|
+
|
|
517
|
+
# auth_names
|
|
518
|
+
auth_names = opts[:debug_auth_names] || []
|
|
519
|
+
|
|
520
|
+
new_options = opts.merge(
|
|
521
|
+
:operation => :"ProcessApi.get_entrypoint_logs",
|
|
522
|
+
:header_params => header_params,
|
|
523
|
+
:query_params => query_params,
|
|
524
|
+
:form_params => form_params,
|
|
525
|
+
:body => post_body,
|
|
526
|
+
:auth_names => auth_names,
|
|
527
|
+
:return_type => return_type
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
531
|
+
if @api_client.config.debugging
|
|
532
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_entrypoint_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
533
|
+
end
|
|
534
|
+
return data, status_code, headers
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
# Get entrypoint session details
|
|
538
|
+
# Get details of an entrypoint session including its commands
|
|
539
|
+
# @param [Hash] opts the optional parameters
|
|
540
|
+
# @return [Session]
|
|
541
|
+
def get_entrypoint_session(opts = {})
|
|
542
|
+
data, _status_code, _headers = get_entrypoint_session_with_http_info(opts)
|
|
543
|
+
data
|
|
544
|
+
end
|
|
545
|
+
|
|
546
|
+
# Get entrypoint session details
|
|
547
|
+
# Get details of an entrypoint session including its commands
|
|
548
|
+
# @param [Hash] opts the optional parameters
|
|
549
|
+
# @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
|
|
550
|
+
def get_entrypoint_session_with_http_info(opts = {})
|
|
551
|
+
if @api_client.config.debugging
|
|
552
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_entrypoint_session ...'
|
|
553
|
+
end
|
|
554
|
+
# resource path
|
|
555
|
+
local_var_path = '/process/session/entrypoint'
|
|
556
|
+
|
|
557
|
+
# query parameters
|
|
558
|
+
query_params = opts[:query_params] || {}
|
|
559
|
+
|
|
560
|
+
# header parameters
|
|
561
|
+
header_params = opts[:header_params] || {}
|
|
562
|
+
# HTTP header 'Accept' (if needed)
|
|
563
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
564
|
+
|
|
565
|
+
# form parameters
|
|
566
|
+
form_params = opts[:form_params] || {}
|
|
567
|
+
|
|
568
|
+
# http body (model)
|
|
569
|
+
post_body = opts[:debug_body]
|
|
570
|
+
|
|
571
|
+
# return_type
|
|
572
|
+
return_type = opts[:debug_return_type] || 'Session'
|
|
573
|
+
|
|
574
|
+
# auth_names
|
|
575
|
+
auth_names = opts[:debug_auth_names] || []
|
|
576
|
+
|
|
577
|
+
new_options = opts.merge(
|
|
578
|
+
:operation => :"ProcessApi.get_entrypoint_session",
|
|
579
|
+
:header_params => header_params,
|
|
580
|
+
:query_params => query_params,
|
|
581
|
+
:form_params => form_params,
|
|
582
|
+
:body => post_body,
|
|
583
|
+
:auth_names => auth_names,
|
|
584
|
+
:return_type => return_type
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
588
|
+
if @api_client.config.debugging
|
|
589
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_entrypoint_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
590
|
+
end
|
|
591
|
+
return data, status_code, headers
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
# Get PTY session information
|
|
595
|
+
# Get detailed information about a specific pseudo-terminal session
|
|
596
|
+
# @param session_id [String] PTY session ID
|
|
597
|
+
# @param [Hash] opts the optional parameters
|
|
598
|
+
# @return [PtySessionInfo]
|
|
599
|
+
def get_pty_session(session_id, opts = {})
|
|
600
|
+
data, _status_code, _headers = get_pty_session_with_http_info(session_id, opts)
|
|
601
|
+
data
|
|
602
|
+
end
|
|
603
|
+
|
|
604
|
+
# Get PTY session information
|
|
605
|
+
# Get detailed information about a specific pseudo-terminal session
|
|
606
|
+
# @param session_id [String] PTY session ID
|
|
607
|
+
# @param [Hash] opts the optional parameters
|
|
608
|
+
# @return [Array<(PtySessionInfo, Integer, Hash)>] PtySessionInfo data, response status code and response headers
|
|
609
|
+
def get_pty_session_with_http_info(session_id, opts = {})
|
|
610
|
+
if @api_client.config.debugging
|
|
611
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_pty_session ...'
|
|
612
|
+
end
|
|
613
|
+
# verify the required parameter 'session_id' is set
|
|
614
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
615
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_pty_session"
|
|
616
|
+
end
|
|
617
|
+
# resource path
|
|
618
|
+
local_var_path = '/process/pty/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
619
|
+
|
|
620
|
+
# query parameters
|
|
621
|
+
query_params = opts[:query_params] || {}
|
|
622
|
+
|
|
623
|
+
# header parameters
|
|
624
|
+
header_params = opts[:header_params] || {}
|
|
625
|
+
# HTTP header 'Accept' (if needed)
|
|
626
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
627
|
+
|
|
628
|
+
# form parameters
|
|
629
|
+
form_params = opts[:form_params] || {}
|
|
630
|
+
|
|
631
|
+
# http body (model)
|
|
632
|
+
post_body = opts[:debug_body]
|
|
633
|
+
|
|
634
|
+
# return_type
|
|
635
|
+
return_type = opts[:debug_return_type] || 'PtySessionInfo'
|
|
636
|
+
|
|
637
|
+
# auth_names
|
|
638
|
+
auth_names = opts[:debug_auth_names] || []
|
|
639
|
+
|
|
640
|
+
new_options = opts.merge(
|
|
641
|
+
:operation => :"ProcessApi.get_pty_session",
|
|
642
|
+
:header_params => header_params,
|
|
643
|
+
:query_params => query_params,
|
|
644
|
+
:form_params => form_params,
|
|
645
|
+
:body => post_body,
|
|
646
|
+
:auth_names => auth_names,
|
|
647
|
+
:return_type => return_type
|
|
648
|
+
)
|
|
649
|
+
|
|
650
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
651
|
+
if @api_client.config.debugging
|
|
652
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
653
|
+
end
|
|
654
|
+
return data, status_code, headers
|
|
655
|
+
end
|
|
656
|
+
|
|
657
|
+
# Get session details
|
|
658
|
+
# Get details of a specific session including its commands
|
|
659
|
+
# @param session_id [String] Session ID
|
|
660
|
+
# @param [Hash] opts the optional parameters
|
|
661
|
+
# @return [Session]
|
|
662
|
+
def get_session(session_id, opts = {})
|
|
663
|
+
data, _status_code, _headers = get_session_with_http_info(session_id, opts)
|
|
664
|
+
data
|
|
665
|
+
end
|
|
666
|
+
|
|
667
|
+
# Get session details
|
|
668
|
+
# Get details of a specific session including its commands
|
|
669
|
+
# @param session_id [String] Session ID
|
|
670
|
+
# @param [Hash] opts the optional parameters
|
|
671
|
+
# @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
|
|
672
|
+
def get_session_with_http_info(session_id, opts = {})
|
|
673
|
+
if @api_client.config.debugging
|
|
674
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_session ...'
|
|
675
|
+
end
|
|
676
|
+
# verify the required parameter 'session_id' is set
|
|
677
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
678
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_session"
|
|
679
|
+
end
|
|
680
|
+
# resource path
|
|
681
|
+
local_var_path = '/process/session/{sessionId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
682
|
+
|
|
683
|
+
# query parameters
|
|
684
|
+
query_params = opts[:query_params] || {}
|
|
685
|
+
|
|
686
|
+
# header parameters
|
|
687
|
+
header_params = opts[:header_params] || {}
|
|
688
|
+
# HTTP header 'Accept' (if needed)
|
|
689
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
690
|
+
|
|
691
|
+
# form parameters
|
|
692
|
+
form_params = opts[:form_params] || {}
|
|
693
|
+
|
|
694
|
+
# http body (model)
|
|
695
|
+
post_body = opts[:debug_body]
|
|
696
|
+
|
|
697
|
+
# return_type
|
|
698
|
+
return_type = opts[:debug_return_type] || 'Session'
|
|
699
|
+
|
|
700
|
+
# auth_names
|
|
701
|
+
auth_names = opts[:debug_auth_names] || []
|
|
702
|
+
|
|
703
|
+
new_options = opts.merge(
|
|
704
|
+
:operation => :"ProcessApi.get_session",
|
|
705
|
+
:header_params => header_params,
|
|
706
|
+
:query_params => query_params,
|
|
707
|
+
:form_params => form_params,
|
|
708
|
+
:body => post_body,
|
|
709
|
+
:auth_names => auth_names,
|
|
710
|
+
:return_type => return_type
|
|
711
|
+
)
|
|
712
|
+
|
|
713
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
714
|
+
if @api_client.config.debugging
|
|
715
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
716
|
+
end
|
|
717
|
+
return data, status_code, headers
|
|
718
|
+
end
|
|
719
|
+
|
|
720
|
+
# Get session command details
|
|
721
|
+
# Get details of a specific command within a session
|
|
722
|
+
# @param session_id [String] Session ID
|
|
723
|
+
# @param command_id [String] Command ID
|
|
724
|
+
# @param [Hash] opts the optional parameters
|
|
725
|
+
# @return [Command]
|
|
726
|
+
def get_session_command(session_id, command_id, opts = {})
|
|
727
|
+
data, _status_code, _headers = get_session_command_with_http_info(session_id, command_id, opts)
|
|
728
|
+
data
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# Get session command details
|
|
732
|
+
# Get details of a specific command within a session
|
|
733
|
+
# @param session_id [String] Session ID
|
|
734
|
+
# @param command_id [String] Command ID
|
|
735
|
+
# @param [Hash] opts the optional parameters
|
|
736
|
+
# @return [Array<(Command, Integer, Hash)>] Command data, response status code and response headers
|
|
737
|
+
def get_session_command_with_http_info(session_id, command_id, opts = {})
|
|
738
|
+
if @api_client.config.debugging
|
|
739
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_session_command ...'
|
|
740
|
+
end
|
|
741
|
+
# verify the required parameter 'session_id' is set
|
|
742
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
743
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_session_command"
|
|
744
|
+
end
|
|
745
|
+
# verify the required parameter 'command_id' is set
|
|
746
|
+
if @api_client.config.client_side_validation && command_id.nil?
|
|
747
|
+
fail ArgumentError, "Missing the required parameter 'command_id' when calling ProcessApi.get_session_command"
|
|
748
|
+
end
|
|
749
|
+
# resource path
|
|
750
|
+
local_var_path = '/process/session/{sessionId}/command/{commandId}'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'commandId' + '}', CGI.escape(command_id.to_s))
|
|
751
|
+
|
|
752
|
+
# query parameters
|
|
753
|
+
query_params = opts[:query_params] || {}
|
|
754
|
+
|
|
755
|
+
# header parameters
|
|
756
|
+
header_params = opts[:header_params] || {}
|
|
757
|
+
# HTTP header 'Accept' (if needed)
|
|
758
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
759
|
+
|
|
760
|
+
# form parameters
|
|
761
|
+
form_params = opts[:form_params] || {}
|
|
762
|
+
|
|
763
|
+
# http body (model)
|
|
764
|
+
post_body = opts[:debug_body]
|
|
765
|
+
|
|
766
|
+
# return_type
|
|
767
|
+
return_type = opts[:debug_return_type] || 'Command'
|
|
768
|
+
|
|
769
|
+
# auth_names
|
|
770
|
+
auth_names = opts[:debug_auth_names] || []
|
|
771
|
+
|
|
772
|
+
new_options = opts.merge(
|
|
773
|
+
:operation => :"ProcessApi.get_session_command",
|
|
774
|
+
:header_params => header_params,
|
|
775
|
+
:query_params => query_params,
|
|
776
|
+
:form_params => form_params,
|
|
777
|
+
:body => post_body,
|
|
778
|
+
:auth_names => auth_names,
|
|
779
|
+
:return_type => return_type
|
|
780
|
+
)
|
|
781
|
+
|
|
782
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
783
|
+
if @api_client.config.debugging
|
|
784
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_session_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
785
|
+
end
|
|
786
|
+
return data, status_code, headers
|
|
787
|
+
end
|
|
788
|
+
|
|
789
|
+
# Get session command logs
|
|
790
|
+
# Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming.
|
|
791
|
+
# @param session_id [String] Session ID
|
|
792
|
+
# @param command_id [String] Command ID
|
|
793
|
+
# @param [Hash] opts the optional parameters
|
|
794
|
+
# @option opts [Boolean] :follow Follow logs in real-time (WebSocket only)
|
|
795
|
+
# @return [SessionCommandLogsResponse]
|
|
796
|
+
def get_session_command_logs(session_id, command_id, opts = {})
|
|
797
|
+
data, _status_code, _headers = get_session_command_logs_with_http_info(session_id, command_id, opts)
|
|
798
|
+
data
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
# Get session command logs
|
|
802
|
+
# Get logs for a specific command within a session. Returns JSON with separated stdout/stderr for SDK >= 0.167.0, plain text otherwise. Supports WebSocket streaming.
|
|
803
|
+
# @param session_id [String] Session ID
|
|
804
|
+
# @param command_id [String] Command ID
|
|
805
|
+
# @param [Hash] opts the optional parameters
|
|
806
|
+
# @option opts [Boolean] :follow Follow logs in real-time (WebSocket only)
|
|
807
|
+
# @return [Array<(SessionCommandLogsResponse, Integer, Hash)>] SessionCommandLogsResponse data, response status code and response headers
|
|
808
|
+
def get_session_command_logs_with_http_info(session_id, command_id, opts = {})
|
|
809
|
+
if @api_client.config.debugging
|
|
810
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.get_session_command_logs ...'
|
|
811
|
+
end
|
|
812
|
+
# verify the required parameter 'session_id' is set
|
|
813
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
814
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.get_session_command_logs"
|
|
815
|
+
end
|
|
816
|
+
# verify the required parameter 'command_id' is set
|
|
817
|
+
if @api_client.config.client_side_validation && command_id.nil?
|
|
818
|
+
fail ArgumentError, "Missing the required parameter 'command_id' when calling ProcessApi.get_session_command_logs"
|
|
819
|
+
end
|
|
820
|
+
# resource path
|
|
821
|
+
local_var_path = '/process/session/{sessionId}/command/{commandId}/logs'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'commandId' + '}', CGI.escape(command_id.to_s))
|
|
822
|
+
|
|
823
|
+
# query parameters
|
|
824
|
+
query_params = opts[:query_params] || {}
|
|
825
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
826
|
+
|
|
827
|
+
# header parameters
|
|
828
|
+
header_params = opts[:header_params] || {}
|
|
829
|
+
# HTTP header 'Accept' (if needed)
|
|
830
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/plain']) unless header_params['Accept']
|
|
831
|
+
|
|
832
|
+
# form parameters
|
|
833
|
+
form_params = opts[:form_params] || {}
|
|
834
|
+
|
|
835
|
+
# http body (model)
|
|
836
|
+
post_body = opts[:debug_body]
|
|
837
|
+
|
|
838
|
+
# return_type
|
|
839
|
+
return_type = opts[:debug_return_type] || 'SessionCommandLogsResponse'
|
|
840
|
+
|
|
841
|
+
# auth_names
|
|
842
|
+
auth_names = opts[:debug_auth_names] || []
|
|
843
|
+
|
|
844
|
+
new_options = opts.merge(
|
|
845
|
+
:operation => :"ProcessApi.get_session_command_logs",
|
|
846
|
+
:header_params => header_params,
|
|
847
|
+
:query_params => query_params,
|
|
848
|
+
:form_params => form_params,
|
|
849
|
+
:body => post_body,
|
|
850
|
+
:auth_names => auth_names,
|
|
851
|
+
:return_type => return_type
|
|
852
|
+
)
|
|
853
|
+
|
|
854
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
855
|
+
if @api_client.config.debugging
|
|
856
|
+
@api_client.config.logger.debug "API called: ProcessApi#get_session_command_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
857
|
+
end
|
|
858
|
+
return data, status_code, headers
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
# List all PTY sessions
|
|
862
|
+
# Get a list of all active pseudo-terminal sessions
|
|
863
|
+
# @param [Hash] opts the optional parameters
|
|
864
|
+
# @return [PtyListResponse]
|
|
865
|
+
def list_pty_sessions(opts = {})
|
|
866
|
+
data, _status_code, _headers = list_pty_sessions_with_http_info(opts)
|
|
867
|
+
data
|
|
868
|
+
end
|
|
869
|
+
|
|
870
|
+
# List all PTY sessions
|
|
871
|
+
# Get a list of all active pseudo-terminal sessions
|
|
872
|
+
# @param [Hash] opts the optional parameters
|
|
873
|
+
# @return [Array<(PtyListResponse, Integer, Hash)>] PtyListResponse data, response status code and response headers
|
|
874
|
+
def list_pty_sessions_with_http_info(opts = {})
|
|
875
|
+
if @api_client.config.debugging
|
|
876
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.list_pty_sessions ...'
|
|
877
|
+
end
|
|
878
|
+
# resource path
|
|
879
|
+
local_var_path = '/process/pty'
|
|
880
|
+
|
|
881
|
+
# query parameters
|
|
882
|
+
query_params = opts[:query_params] || {}
|
|
883
|
+
|
|
884
|
+
# header parameters
|
|
885
|
+
header_params = opts[:header_params] || {}
|
|
886
|
+
# HTTP header 'Accept' (if needed)
|
|
887
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
888
|
+
|
|
889
|
+
# form parameters
|
|
890
|
+
form_params = opts[:form_params] || {}
|
|
891
|
+
|
|
892
|
+
# http body (model)
|
|
893
|
+
post_body = opts[:debug_body]
|
|
894
|
+
|
|
895
|
+
# return_type
|
|
896
|
+
return_type = opts[:debug_return_type] || 'PtyListResponse'
|
|
897
|
+
|
|
898
|
+
# auth_names
|
|
899
|
+
auth_names = opts[:debug_auth_names] || []
|
|
900
|
+
|
|
901
|
+
new_options = opts.merge(
|
|
902
|
+
:operation => :"ProcessApi.list_pty_sessions",
|
|
903
|
+
:header_params => header_params,
|
|
904
|
+
:query_params => query_params,
|
|
905
|
+
:form_params => form_params,
|
|
906
|
+
:body => post_body,
|
|
907
|
+
:auth_names => auth_names,
|
|
908
|
+
:return_type => return_type
|
|
909
|
+
)
|
|
910
|
+
|
|
911
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
912
|
+
if @api_client.config.debugging
|
|
913
|
+
@api_client.config.logger.debug "API called: ProcessApi#list_pty_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
914
|
+
end
|
|
915
|
+
return data, status_code, headers
|
|
916
|
+
end
|
|
917
|
+
|
|
918
|
+
# List all sessions
|
|
919
|
+
# Get a list of all active shell sessions
|
|
920
|
+
# @param [Hash] opts the optional parameters
|
|
921
|
+
# @return [Array<Session>]
|
|
922
|
+
def list_sessions(opts = {})
|
|
923
|
+
data, _status_code, _headers = list_sessions_with_http_info(opts)
|
|
924
|
+
data
|
|
925
|
+
end
|
|
926
|
+
|
|
927
|
+
# List all sessions
|
|
928
|
+
# Get a list of all active shell sessions
|
|
929
|
+
# @param [Hash] opts the optional parameters
|
|
930
|
+
# @return [Array<(Array<Session>, Integer, Hash)>] Array<Session> data, response status code and response headers
|
|
931
|
+
def list_sessions_with_http_info(opts = {})
|
|
932
|
+
if @api_client.config.debugging
|
|
933
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.list_sessions ...'
|
|
934
|
+
end
|
|
935
|
+
# resource path
|
|
936
|
+
local_var_path = '/process/session'
|
|
937
|
+
|
|
938
|
+
# query parameters
|
|
939
|
+
query_params = opts[:query_params] || {}
|
|
940
|
+
|
|
941
|
+
# header parameters
|
|
942
|
+
header_params = opts[:header_params] || {}
|
|
943
|
+
# HTTP header 'Accept' (if needed)
|
|
944
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
945
|
+
|
|
946
|
+
# form parameters
|
|
947
|
+
form_params = opts[:form_params] || {}
|
|
948
|
+
|
|
949
|
+
# http body (model)
|
|
950
|
+
post_body = opts[:debug_body]
|
|
951
|
+
|
|
952
|
+
# return_type
|
|
953
|
+
return_type = opts[:debug_return_type] || 'Array<Session>'
|
|
954
|
+
|
|
955
|
+
# auth_names
|
|
956
|
+
auth_names = opts[:debug_auth_names] || []
|
|
957
|
+
|
|
958
|
+
new_options = opts.merge(
|
|
959
|
+
:operation => :"ProcessApi.list_sessions",
|
|
960
|
+
:header_params => header_params,
|
|
961
|
+
:query_params => query_params,
|
|
962
|
+
:form_params => form_params,
|
|
963
|
+
:body => post_body,
|
|
964
|
+
:auth_names => auth_names,
|
|
965
|
+
:return_type => return_type
|
|
966
|
+
)
|
|
967
|
+
|
|
968
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
969
|
+
if @api_client.config.debugging
|
|
970
|
+
@api_client.config.logger.debug "API called: ProcessApi#list_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
971
|
+
end
|
|
972
|
+
return data, status_code, headers
|
|
973
|
+
end
|
|
974
|
+
|
|
975
|
+
# Resize a PTY session
|
|
976
|
+
# Resize the terminal dimensions of a pseudo-terminal session
|
|
977
|
+
# @param session_id [String] PTY session ID
|
|
978
|
+
# @param request [PtyResizeRequest] Resize request with new dimensions
|
|
979
|
+
# @param [Hash] opts the optional parameters
|
|
980
|
+
# @return [PtySessionInfo]
|
|
981
|
+
def resize_pty_session(session_id, request, opts = {})
|
|
982
|
+
data, _status_code, _headers = resize_pty_session_with_http_info(session_id, request, opts)
|
|
983
|
+
data
|
|
984
|
+
end
|
|
985
|
+
|
|
986
|
+
# Resize a PTY session
|
|
987
|
+
# Resize the terminal dimensions of a pseudo-terminal session
|
|
988
|
+
# @param session_id [String] PTY session ID
|
|
989
|
+
# @param request [PtyResizeRequest] Resize request with new dimensions
|
|
990
|
+
# @param [Hash] opts the optional parameters
|
|
991
|
+
# @return [Array<(PtySessionInfo, Integer, Hash)>] PtySessionInfo data, response status code and response headers
|
|
992
|
+
def resize_pty_session_with_http_info(session_id, request, opts = {})
|
|
993
|
+
if @api_client.config.debugging
|
|
994
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.resize_pty_session ...'
|
|
995
|
+
end
|
|
996
|
+
# verify the required parameter 'session_id' is set
|
|
997
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
998
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.resize_pty_session"
|
|
999
|
+
end
|
|
1000
|
+
# verify the required parameter 'request' is set
|
|
1001
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
1002
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.resize_pty_session"
|
|
1003
|
+
end
|
|
1004
|
+
# resource path
|
|
1005
|
+
local_var_path = '/process/pty/{sessionId}/resize'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
1006
|
+
|
|
1007
|
+
# query parameters
|
|
1008
|
+
query_params = opts[:query_params] || {}
|
|
1009
|
+
|
|
1010
|
+
# header parameters
|
|
1011
|
+
header_params = opts[:header_params] || {}
|
|
1012
|
+
# HTTP header 'Accept' (if needed)
|
|
1013
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1014
|
+
# HTTP header 'Content-Type'
|
|
1015
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1016
|
+
if !content_type.nil?
|
|
1017
|
+
header_params['Content-Type'] = content_type
|
|
1018
|
+
end
|
|
1019
|
+
|
|
1020
|
+
# form parameters
|
|
1021
|
+
form_params = opts[:form_params] || {}
|
|
1022
|
+
|
|
1023
|
+
# http body (model)
|
|
1024
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
1025
|
+
|
|
1026
|
+
# return_type
|
|
1027
|
+
return_type = opts[:debug_return_type] || 'PtySessionInfo'
|
|
1028
|
+
|
|
1029
|
+
# auth_names
|
|
1030
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1031
|
+
|
|
1032
|
+
new_options = opts.merge(
|
|
1033
|
+
:operation => :"ProcessApi.resize_pty_session",
|
|
1034
|
+
:header_params => header_params,
|
|
1035
|
+
:query_params => query_params,
|
|
1036
|
+
:form_params => form_params,
|
|
1037
|
+
:body => post_body,
|
|
1038
|
+
:auth_names => auth_names,
|
|
1039
|
+
:return_type => return_type
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1043
|
+
if @api_client.config.debugging
|
|
1044
|
+
@api_client.config.logger.debug "API called: ProcessApi#resize_pty_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1045
|
+
end
|
|
1046
|
+
return data, status_code, headers
|
|
1047
|
+
end
|
|
1048
|
+
|
|
1049
|
+
# Send input to command
|
|
1050
|
+
# Send input data to a running command in a session for interactive execution
|
|
1051
|
+
# @param session_id [String] Session ID
|
|
1052
|
+
# @param command_id [String] Command ID
|
|
1053
|
+
# @param request [SessionSendInputRequest] Input send request
|
|
1054
|
+
# @param [Hash] opts the optional parameters
|
|
1055
|
+
# @return [nil]
|
|
1056
|
+
def send_input(session_id, command_id, request, opts = {})
|
|
1057
|
+
send_input_with_http_info(session_id, command_id, request, opts)
|
|
1058
|
+
nil
|
|
1059
|
+
end
|
|
1060
|
+
|
|
1061
|
+
# Send input to command
|
|
1062
|
+
# Send input data to a running command in a session for interactive execution
|
|
1063
|
+
# @param session_id [String] Session ID
|
|
1064
|
+
# @param command_id [String] Command ID
|
|
1065
|
+
# @param request [SessionSendInputRequest] Input send request
|
|
1066
|
+
# @param [Hash] opts the optional parameters
|
|
1067
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1068
|
+
def send_input_with_http_info(session_id, command_id, request, opts = {})
|
|
1069
|
+
if @api_client.config.debugging
|
|
1070
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.send_input ...'
|
|
1071
|
+
end
|
|
1072
|
+
# verify the required parameter 'session_id' is set
|
|
1073
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1074
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.send_input"
|
|
1075
|
+
end
|
|
1076
|
+
# verify the required parameter 'command_id' is set
|
|
1077
|
+
if @api_client.config.client_side_validation && command_id.nil?
|
|
1078
|
+
fail ArgumentError, "Missing the required parameter 'command_id' when calling ProcessApi.send_input"
|
|
1079
|
+
end
|
|
1080
|
+
# verify the required parameter 'request' is set
|
|
1081
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
1082
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.send_input"
|
|
1083
|
+
end
|
|
1084
|
+
# resource path
|
|
1085
|
+
local_var_path = '/process/session/{sessionId}/command/{commandId}/input'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s)).sub('{' + 'commandId' + '}', CGI.escape(command_id.to_s))
|
|
1086
|
+
|
|
1087
|
+
# query parameters
|
|
1088
|
+
query_params = opts[:query_params] || {}
|
|
1089
|
+
|
|
1090
|
+
# header parameters
|
|
1091
|
+
header_params = opts[:header_params] || {}
|
|
1092
|
+
# HTTP header 'Content-Type'
|
|
1093
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1094
|
+
if !content_type.nil?
|
|
1095
|
+
header_params['Content-Type'] = content_type
|
|
1096
|
+
end
|
|
1097
|
+
|
|
1098
|
+
# form parameters
|
|
1099
|
+
form_params = opts[:form_params] || {}
|
|
1100
|
+
|
|
1101
|
+
# http body (model)
|
|
1102
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
1103
|
+
|
|
1104
|
+
# return_type
|
|
1105
|
+
return_type = opts[:debug_return_type]
|
|
1106
|
+
|
|
1107
|
+
# auth_names
|
|
1108
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1109
|
+
|
|
1110
|
+
new_options = opts.merge(
|
|
1111
|
+
:operation => :"ProcessApi.send_input",
|
|
1112
|
+
:header_params => header_params,
|
|
1113
|
+
:query_params => query_params,
|
|
1114
|
+
:form_params => form_params,
|
|
1115
|
+
:body => post_body,
|
|
1116
|
+
:auth_names => auth_names,
|
|
1117
|
+
:return_type => return_type
|
|
1118
|
+
)
|
|
1119
|
+
|
|
1120
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1121
|
+
if @api_client.config.debugging
|
|
1122
|
+
@api_client.config.logger.debug "API called: ProcessApi#send_input\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1123
|
+
end
|
|
1124
|
+
return data, status_code, headers
|
|
1125
|
+
end
|
|
1126
|
+
|
|
1127
|
+
# Execute command in session
|
|
1128
|
+
# Execute a command within an existing shell session
|
|
1129
|
+
# @param session_id [String] Session ID
|
|
1130
|
+
# @param request [SessionExecuteRequest] Command execution request
|
|
1131
|
+
# @param [Hash] opts the optional parameters
|
|
1132
|
+
# @return [SessionExecuteResponse]
|
|
1133
|
+
def session_execute_command(session_id, request, opts = {})
|
|
1134
|
+
data, _status_code, _headers = session_execute_command_with_http_info(session_id, request, opts)
|
|
1135
|
+
data
|
|
1136
|
+
end
|
|
1137
|
+
|
|
1138
|
+
# Execute command in session
|
|
1139
|
+
# Execute a command within an existing shell session
|
|
1140
|
+
# @param session_id [String] Session ID
|
|
1141
|
+
# @param request [SessionExecuteRequest] Command execution request
|
|
1142
|
+
# @param [Hash] opts the optional parameters
|
|
1143
|
+
# @return [Array<(SessionExecuteResponse, Integer, Hash)>] SessionExecuteResponse data, response status code and response headers
|
|
1144
|
+
def session_execute_command_with_http_info(session_id, request, opts = {})
|
|
1145
|
+
if @api_client.config.debugging
|
|
1146
|
+
@api_client.config.logger.debug 'Calling API: ProcessApi.session_execute_command ...'
|
|
1147
|
+
end
|
|
1148
|
+
# verify the required parameter 'session_id' is set
|
|
1149
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
|
1150
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling ProcessApi.session_execute_command"
|
|
1151
|
+
end
|
|
1152
|
+
# verify the required parameter 'request' is set
|
|
1153
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
1154
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ProcessApi.session_execute_command"
|
|
1155
|
+
end
|
|
1156
|
+
# resource path
|
|
1157
|
+
local_var_path = '/process/session/{sessionId}/exec'.sub('{' + 'sessionId' + '}', CGI.escape(session_id.to_s))
|
|
1158
|
+
|
|
1159
|
+
# query parameters
|
|
1160
|
+
query_params = opts[:query_params] || {}
|
|
1161
|
+
|
|
1162
|
+
# header parameters
|
|
1163
|
+
header_params = opts[:header_params] || {}
|
|
1164
|
+
# HTTP header 'Accept' (if needed)
|
|
1165
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1166
|
+
# HTTP header 'Content-Type'
|
|
1167
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1168
|
+
if !content_type.nil?
|
|
1169
|
+
header_params['Content-Type'] = content_type
|
|
1170
|
+
end
|
|
1171
|
+
|
|
1172
|
+
# form parameters
|
|
1173
|
+
form_params = opts[:form_params] || {}
|
|
1174
|
+
|
|
1175
|
+
# http body (model)
|
|
1176
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
1177
|
+
|
|
1178
|
+
# return_type
|
|
1179
|
+
return_type = opts[:debug_return_type] || 'SessionExecuteResponse'
|
|
1180
|
+
|
|
1181
|
+
# auth_names
|
|
1182
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1183
|
+
|
|
1184
|
+
new_options = opts.merge(
|
|
1185
|
+
:operation => :"ProcessApi.session_execute_command",
|
|
1186
|
+
:header_params => header_params,
|
|
1187
|
+
:query_params => query_params,
|
|
1188
|
+
:form_params => form_params,
|
|
1189
|
+
:body => post_body,
|
|
1190
|
+
:auth_names => auth_names,
|
|
1191
|
+
:return_type => return_type
|
|
1192
|
+
)
|
|
1193
|
+
|
|
1194
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1195
|
+
if @api_client.config.debugging
|
|
1196
|
+
@api_client.config.logger.debug "API called: ProcessApi#session_execute_command\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1197
|
+
end
|
|
1198
|
+
return data, status_code, headers
|
|
1199
|
+
end
|
|
1200
|
+
end
|
|
1201
|
+
end
|