Class: SmplkitGeneratedClient::Jobs::RunsApi
- Inherits:
-
Object
- Object
- SmplkitGeneratedClient::Jobs::RunsApi
- Defined in:
- lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#cancel_run(run_id, opts = {}) ⇒ RunResponse
Cancel Run Cancel a pending or running run.
-
#cancel_run_with_http_info(run_id, opts = {}) ⇒ Array<(RunResponse, Integer, Hash)>
Cancel Run Cancel a pending or running run.
-
#get_run(run_id, opts = {}) ⇒ RunResponse
Get Run Retrieve a single run by its id.
-
#get_run_with_http_info(run_id, opts = {}) ⇒ Array<(RunResponse, Integer, Hash)>
Get Run Retrieve a single run by its id.
-
#initialize(api_client = ApiClient.default) ⇒ RunsApi
constructor
A new instance of RunsApi.
-
#list_runs(opts = {}) ⇒ RunListResponse
List Runs List runs for this account, newest first (cursor paginated).
-
#list_runs_with_http_info(opts = {}) ⇒ Array<(RunListResponse, Integer, Hash)>
List Runs List runs for this account, newest first (cursor paginated).
-
#rerun_run(run_id, opts = {}) ⇒ RunResponse
Rerun Run Spawn a new run from a prior run, using the job’s current configuration.
-
#rerun_run_with_http_info(run_id, opts = {}) ⇒ Array<(RunResponse, Integer, Hash)>
Rerun Run Spawn a new run from a prior run, using the job's current configuration.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#cancel_run(run_id, opts = {}) ⇒ RunResponse
Cancel Run Cancel a pending or running run. Returns ‘409` if the run is already in a terminal state. Canceling a running run stops us tracking it, but the HTTP request may already be in flight — cancel means "stop tracking," not "guaranteed it didn’t happen."
27 28 29 30 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 27 def cancel_run(run_id, opts = {}) data, _status_code, _headers = cancel_run_with_http_info(run_id, opts) data end |
#cancel_run_with_http_info(run_id, opts = {}) ⇒ Array<(RunResponse, Integer, Hash)>
Cancel Run Cancel a pending or running run. Returns `409` if the run is already in a terminal state. Canceling a running run stops us tracking it, but the HTTP request may already be in flight — cancel means "stop tracking," not "guaranteed it didn't happen."
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 37 def cancel_run_with_http_info(run_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RunsApi.cancel_run ...' end # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? fail ArgumentError, "Missing the required parameter 'run_id' when calling RunsApi.cancel_run" end # resource path local_var_path = '/api/v1/runs/{run_id}/actions/cancel'.sub('{run_id}', CGI.escape(run_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RunResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RunsApi.cancel_run", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RunsApi#cancel_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_run(run_id, opts = {}) ⇒ RunResponse
Get Run Retrieve a single run by its id.
90 91 92 93 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 90 def get_run(run_id, opts = {}) data, _status_code, _headers = get_run_with_http_info(run_id, opts) data end |
#get_run_with_http_info(run_id, opts = {}) ⇒ Array<(RunResponse, Integer, Hash)>
Get Run Retrieve a single run by its id.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 100 def get_run_with_http_info(run_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RunsApi.get_run ...' end # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? fail ArgumentError, "Missing the required parameter 'run_id' when calling RunsApi.get_run" end # resource path local_var_path = '/api/v1/runs/{run_id}'.sub('{run_id}', CGI.escape(run_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RunResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RunsApi.get_run", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RunsApi#get_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_runs(opts = {}) ⇒ RunListResponse
List Runs List runs for this account, newest first (cursor paginated). Use ‘filter=slug` for a single job’s run history.
155 156 157 158 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 155 def list_runs(opts = {}) data, _status_code, _headers = list_runs_with_http_info(opts) data end |
#list_runs_with_http_info(opts = {}) ⇒ Array<(RunListResponse, Integer, Hash)>
List Runs List runs for this account, newest first (cursor paginated). Use `filter=slug` for a single job's run history.
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 167 def list_runs_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RunsApi.list_runs ...' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling RunsApi.list_runs, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/runs' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[job]'] = opts[:'filter_job'] if !opts[:'filter_job'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[after]'] = opts[:'page_after'] if !opts[:'page_after'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RunListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RunsApi.list_runs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RunsApi#list_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#rerun_run(run_id, opts = {}) ⇒ RunResponse
Rerun Run Spawn a new run from a prior run, using the job’s current configuration. Returns ‘409` if the run’s parent job has been deleted.
223 224 225 226 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 223 def rerun_run(run_id, opts = {}) data, _status_code, _headers = rerun_run_with_http_info(run_id, opts) data end |
#rerun_run_with_http_info(run_id, opts = {}) ⇒ Array<(RunResponse, Integer, Hash)>
Rerun Run Spawn a new run from a prior run, using the job's current configuration. Returns `409` if the run's parent job has been deleted.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 |
# File 'lib/smplkit/_generated/jobs/lib/smplkit_jobs_client/api/runs_api.rb', line 233 def rerun_run_with_http_info(run_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RunsApi.rerun_run ...' end # verify the required parameter 'run_id' is set if @api_client.config.client_side_validation && run_id.nil? fail ArgumentError, "Missing the required parameter 'run_id' when calling RunsApi.rerun_run" end # resource path local_var_path = '/api/v1/runs/{run_id}/actions/rerun'.sub('{run_id}', CGI.escape(run_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RunResponse' # auth_names auth_names = opts[:debug_auth_names] || ['HTTPBearer'] = opts.merge( :operation => :"RunsApi.rerun_run", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RunsApi#rerun_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |