Class: HatchetSdkRest::TaskApi
- Inherits:
-
Object
- Object
- HatchetSdkRest::TaskApi
- Defined in:
- lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ TaskApi
constructor
A new instance of TaskApi.
-
#v1_dag_list_tasks(dag_ids, tenant, opts = {}) ⇒ Array<V1DagChildren>
List tasks Lists all tasks that belong a specific list of dags.
-
#v1_dag_list_tasks_with_http_info(dag_ids, tenant, opts = {}) ⇒ Array<(Array<V1DagChildren>, Integer, Hash)>
List tasks Lists all tasks that belong a specific list of dags.
-
#v1_task_cancel(tenant, v1_cancel_task_request, opts = {}) ⇒ V1CancelledTasks
Cancel tasks Cancel tasks.
-
#v1_task_cancel_with_http_info(tenant, v1_cancel_task_request, opts = {}) ⇒ Array<(V1CancelledTasks, Integer, Hash)>
Cancel tasks Cancel tasks.
-
#v1_task_event_list(task, opts = {}) ⇒ V1TaskEventList
List events for a task List events for a task.
-
#v1_task_event_list_with_http_info(task, opts = {}) ⇒ Array<(V1TaskEventList, Integer, Hash)>
List events for a task List events for a task.
-
#v1_task_get(task, opts = {}) ⇒ V1TaskSummary
Get a task Get a task by id.
-
#v1_task_get_point_metrics(tenant, opts = {}) ⇒ V1TaskPointMetrics
Get task point metrics Get a minute by minute breakdown of task metrics for a tenant.
-
#v1_task_get_point_metrics_with_http_info(tenant, opts = {}) ⇒ Array<(V1TaskPointMetrics, Integer, Hash)>
Get task point metrics Get a minute by minute breakdown of task metrics for a tenant.
-
#v1_task_get_with_http_info(task, opts = {}) ⇒ Array<(V1TaskSummary, Integer, Hash)>
Get a task Get a task by id.
-
#v1_task_list_status_metrics(tenant, since, opts = {}) ⇒ Array<V1TaskRunMetric>
Get task metrics Get a summary of task run metrics for a tenant.
-
#v1_task_list_status_metrics_with_http_info(tenant, since, opts = {}) ⇒ Array<(Array<V1TaskRunMetric>, Integer, Hash)>
Get task metrics Get a summary of task run metrics for a tenant.
-
#v1_task_replay(tenant, v1_replay_task_request, opts = {}) ⇒ V1ReplayedTasks
Replay tasks Replay tasks.
-
#v1_task_replay_with_http_info(tenant, v1_replay_task_request, opts = {}) ⇒ Array<(V1ReplayedTasks, Integer, Hash)>
Replay tasks Replay tasks.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#v1_dag_list_tasks(dag_ids, tenant, opts = {}) ⇒ Array<V1DagChildren>
List tasks Lists all tasks that belong a specific list of dags
28 29 30 31 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 28 def v1_dag_list_tasks(dag_ids, tenant, opts = {}) data, _status_code, _headers = v1_dag_list_tasks_with_http_info(dag_ids, tenant, opts) data end |
#v1_dag_list_tasks_with_http_info(dag_ids, tenant, opts = {}) ⇒ Array<(Array<V1DagChildren>, Integer, Hash)>
List tasks Lists all tasks that belong a specific list of dags
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 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 39 def v1_dag_list_tasks_with_http_info(dag_ids, tenant, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_dag_list_tasks ...' end # verify the required parameter 'dag_ids' is set if @api_client.config.client_side_validation && dag_ids.nil? fail ArgumentError, "Missing the required parameter 'dag_ids' when calling TaskApi.v1_dag_list_tasks" end # verify the required parameter 'tenant' is set if @api_client.config.client_side_validation && tenant.nil? fail ArgumentError, "Missing the required parameter 'tenant' when calling TaskApi.v1_dag_list_tasks" end if @api_client.config.client_side_validation && tenant.to_s.length > 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_dag_list_tasks, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && tenant.to_s.length < 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_dag_list_tasks, the character length must be greater than or equal to 36.' end # resource path local_var_path = '/api/v1/stable/dags/tasks' # query parameters query_params = opts[:query_params] || {} query_params[:'dag_ids'] = @api_client.build_collection_param(dag_ids, :multi) query_params[:'tenant'] = tenant # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/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] || 'Array<V1DagChildren>' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_dag_list_tasks", :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: TaskApi#v1_dag_list_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_task_cancel(tenant, v1_cancel_task_request, opts = {}) ⇒ V1CancelledTasks
Cancel tasks Cancel tasks
107 108 109 110 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 107 def v1_task_cancel(tenant, v1_cancel_task_request, opts = {}) data, _status_code, _headers = v1_task_cancel_with_http_info(tenant, v1_cancel_task_request, opts) data end |
#v1_task_cancel_with_http_info(tenant, v1_cancel_task_request, opts = {}) ⇒ Array<(V1CancelledTasks, Integer, Hash)>
Cancel tasks Cancel tasks
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 118 def v1_task_cancel_with_http_info(tenant, v1_cancel_task_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_task_cancel ...' end # verify the required parameter 'tenant' is set if @api_client.config.client_side_validation && tenant.nil? fail ArgumentError, "Missing the required parameter 'tenant' when calling TaskApi.v1_task_cancel" end if @api_client.config.client_side_validation && tenant.to_s.length > 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_cancel, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && tenant.to_s.length < 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_cancel, the character length must be greater than or equal to 36.' end # verify the required parameter 'v1_cancel_task_request' is set if @api_client.config.client_side_validation && v1_cancel_task_request.nil? fail ArgumentError, "Missing the required parameter 'v1_cancel_task_request' when calling TaskApi.v1_task_cancel" end # resource path local_var_path = '/api/v1/stable/tenants/{tenant}/tasks/cancel'.sub('{' + 'tenant' + '}', CGI.escape(tenant.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_cancel_task_request) # return_type return_type = opts[:debug_return_type] || 'V1CancelledTasks' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_task_cancel", :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: TaskApi#v1_task_cancel\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_task_event_list(task, opts = {}) ⇒ V1TaskEventList
List events for a task List events for a task
190 191 192 193 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 190 def v1_task_event_list(task, opts = {}) data, _status_code, _headers = v1_task_event_list_with_http_info(task, opts) data end |
#v1_task_event_list_with_http_info(task, opts = {}) ⇒ Array<(V1TaskEventList, Integer, Hash)>
List events for a task List events for a task
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 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 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 202 def v1_task_event_list_with_http_info(task, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_task_event_list ...' end # verify the required parameter 'task' is set if @api_client.config.client_side_validation && task.nil? fail ArgumentError, "Missing the required parameter 'task' when calling TaskApi.v1_task_event_list" end if @api_client.config.client_side_validation && task.to_s.length > 36 fail ArgumentError, 'invalid value for "task" when calling TaskApi.v1_task_event_list, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && task.to_s.length < 36 fail ArgumentError, 'invalid value for "task" when calling TaskApi.v1_task_event_list, the character length must be greater than or equal to 36.' end # resource path local_var_path = '/api/v1/stable/tasks/{task}/task-events'.sub('{' + 'task' + '}', CGI.escape(task.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/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] || 'V1TaskEventList' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_task_event_list", :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: TaskApi#v1_task_event_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_task_get(task, opts = {}) ⇒ V1TaskSummary
Get a task Get a task by id
266 267 268 269 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 266 def v1_task_get(task, opts = {}) data, _status_code, _headers = v1_task_get_with_http_info(task, opts) data end |
#v1_task_get_point_metrics(tenant, opts = {}) ⇒ V1TaskPointMetrics
Get task point metrics Get a minute by minute breakdown of task metrics for a tenant
341 342 343 344 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 341 def v1_task_get_point_metrics(tenant, opts = {}) data, _status_code, _headers = v1_task_get_point_metrics_with_http_info(tenant, opts) data end |
#v1_task_get_point_metrics_with_http_info(tenant, opts = {}) ⇒ Array<(V1TaskPointMetrics, Integer, Hash)>
Get task point metrics Get a minute by minute breakdown of task metrics for a tenant
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 353 def v1_task_get_point_metrics_with_http_info(tenant, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_task_get_point_metrics ...' end # verify the required parameter 'tenant' is set if @api_client.config.client_side_validation && tenant.nil? fail ArgumentError, "Missing the required parameter 'tenant' when calling TaskApi.v1_task_get_point_metrics" end if @api_client.config.client_side_validation && tenant.to_s.length > 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_get_point_metrics, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && tenant.to_s.length < 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_get_point_metrics, the character length must be greater than or equal to 36.' end # resource path local_var_path = '/api/v1/stable/tenants/{tenant}/task-point-metrics'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil? query_params[:'finishedBefore'] = opts[:'finished_before'] if !opts[:'finished_before'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/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] || 'V1TaskPointMetrics' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_task_get_point_metrics", :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: TaskApi#v1_task_get_point_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_task_get_with_http_info(task, opts = {}) ⇒ Array<(V1TaskSummary, Integer, Hash)>
Get a task Get a task by id
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 277 def v1_task_get_with_http_info(task, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_task_get ...' end # verify the required parameter 'task' is set if @api_client.config.client_side_validation && task.nil? fail ArgumentError, "Missing the required parameter 'task' when calling TaskApi.v1_task_get" end if @api_client.config.client_side_validation && task.to_s.length > 36 fail ArgumentError, 'invalid value for "task" when calling TaskApi.v1_task_get, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && task.to_s.length < 36 fail ArgumentError, 'invalid value for "task" when calling TaskApi.v1_task_get, the character length must be greater than or equal to 36.' end # resource path local_var_path = '/api/v1/stable/tasks/{task}'.sub('{' + 'task' + '}', CGI.escape(task.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'attempt'] = opts[:'attempt'] if !opts[:'attempt'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/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] || 'V1TaskSummary' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_task_get", :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: TaskApi#v1_task_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_task_list_status_metrics(tenant, since, opts = {}) ⇒ Array<V1TaskRunMetric>
Get task metrics Get a summary of task run metrics for a tenant
422 423 424 425 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 422 def v1_task_list_status_metrics(tenant, since, opts = {}) data, _status_code, _headers = v1_task_list_status_metrics_with_http_info(tenant, since, opts) data end |
#v1_task_list_status_metrics_with_http_info(tenant, since, opts = {}) ⇒ Array<(Array<V1TaskRunMetric>, Integer, Hash)>
Get task metrics Get a summary of task run metrics for a tenant
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 438 def v1_task_list_status_metrics_with_http_info(tenant, since, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_task_list_status_metrics ...' end # verify the required parameter 'tenant' is set if @api_client.config.client_side_validation && tenant.nil? fail ArgumentError, "Missing the required parameter 'tenant' when calling TaskApi.v1_task_list_status_metrics" end if @api_client.config.client_side_validation && tenant.to_s.length > 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_list_status_metrics, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && tenant.to_s.length < 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_list_status_metrics, the character length must be greater than or equal to 36.' end # verify the required parameter 'since' is set if @api_client.config.client_side_validation && since.nil? fail ArgumentError, "Missing the required parameter 'since' when calling TaskApi.v1_task_list_status_metrics" end if @api_client.config.client_side_validation && !opts[:'parent_task_external_id'].nil? && opts[:'parent_task_external_id'].to_s.length > 36 fail ArgumentError, 'invalid value for "opts[:"parent_task_external_id"]" when calling TaskApi.v1_task_list_status_metrics, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && !opts[:'parent_task_external_id'].nil? && opts[:'parent_task_external_id'].to_s.length < 36 fail ArgumentError, 'invalid value for "opts[:"parent_task_external_id"]" when calling TaskApi.v1_task_list_status_metrics, the character length must be greater than or equal to 36.' end if @api_client.config.client_side_validation && !opts[:'triggering_event_external_id'].nil? && opts[:'triggering_event_external_id'].to_s.length > 36 fail ArgumentError, 'invalid value for "opts[:"triggering_event_external_id"]" when calling TaskApi.v1_task_list_status_metrics, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && !opts[:'triggering_event_external_id'].nil? && opts[:'triggering_event_external_id'].to_s.length < 36 fail ArgumentError, 'invalid value for "opts[:"triggering_event_external_id"]" when calling TaskApi.v1_task_list_status_metrics, the character length must be greater than or equal to 36.' end # resource path local_var_path = '/api/v1/stable/tenants/{tenant}/task-metrics'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'since'] = since query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'workflow_ids'] = @api_client.build_collection_param(opts[:'workflow_ids'], :multi) if !opts[:'workflow_ids'].nil? query_params[:'parent_task_external_id'] = opts[:'parent_task_external_id'] if !opts[:'parent_task_external_id'].nil? query_params[:'triggering_event_external_id'] = opts[:'triggering_event_external_id'] if !opts[:'triggering_event_external_id'].nil? query_params[:'additional_metadata'] = @api_client.build_collection_param(opts[:'additional_metadata'], :multi) if !opts[:'additional_metadata'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/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] || 'Array<V1TaskRunMetric>' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_task_list_status_metrics", :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: TaskApi#v1_task_list_status_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v1_task_replay(tenant, v1_replay_task_request, opts = {}) ⇒ V1ReplayedTasks
Replay tasks Replay tasks
526 527 528 529 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 526 def v1_task_replay(tenant, v1_replay_task_request, opts = {}) data, _status_code, _headers = v1_task_replay_with_http_info(tenant, v1_replay_task_request, opts) data end |
#v1_task_replay_with_http_info(tenant, v1_replay_task_request, opts = {}) ⇒ Array<(V1ReplayedTasks, Integer, Hash)>
Replay tasks Replay tasks
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/task_api.rb', line 537 def v1_task_replay_with_http_info(tenant, v1_replay_task_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v1_task_replay ...' end # verify the required parameter 'tenant' is set if @api_client.config.client_side_validation && tenant.nil? fail ArgumentError, "Missing the required parameter 'tenant' when calling TaskApi.v1_task_replay" end if @api_client.config.client_side_validation && tenant.to_s.length > 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_replay, the character length must be smaller than or equal to 36.' end if @api_client.config.client_side_validation && tenant.to_s.length < 36 fail ArgumentError, 'invalid value for "tenant" when calling TaskApi.v1_task_replay, the character length must be greater than or equal to 36.' end # verify the required parameter 'v1_replay_task_request' is set if @api_client.config.client_side_validation && v1_replay_task_request.nil? fail ArgumentError, "Missing the required parameter 'v1_replay_task_request' when calling TaskApi.v1_task_replay" end # resource path local_var_path = '/api/v1/stable/tenants/{tenant}/tasks/replay'.sub('{' + 'tenant' + '}', CGI.escape(tenant.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/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_replay_task_request) # return_type return_type = opts[:debug_return_type] || 'V1ReplayedTasks' # auth_names auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth'] = opts.merge( :operation => :"TaskApi.v1_task_replay", :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: TaskApi#v1_task_replay\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |