Class: DatadogAPIClient::V2::CaseManagementAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::CaseManagementAPI
- Defined in:
- lib/datadog_api_client/v2/api/case_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#archive_case(case_id, body, opts = {}) ⇒ Object
Archive case.
-
#archive_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Archive case.
-
#assign_case(case_id, body, opts = {}) ⇒ Object
Assign case.
-
#assign_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Assign case.
-
#create_case(body, opts = {}) ⇒ Object
Create a case.
-
#create_case_with_http_info(body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Create a case.
-
#create_project(body, opts = {}) ⇒ Object
Create a project.
-
#create_project_with_http_info(body, opts = {}) ⇒ Array<(ProjectResponse, Integer, Hash)>
Create a project.
-
#delete_project(project_id, opts = {}) ⇒ Object
Remove a project.
-
#delete_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a project.
-
#get_case(case_id, opts = {}) ⇒ Object
Get the details of a case.
-
#get_case_with_http_info(case_id, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Get the details of a case.
-
#get_project(project_id, opts = {}) ⇒ Object
Get the details of a project.
-
#get_project_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectResponse, Integer, Hash)>
Get the details of a project.
-
#get_projects(opts = {}) ⇒ Object
Get all projects.
-
#get_projects_with_http_info(opts = {}) ⇒ Array<(ProjectsResponse, Integer, Hash)>
Get all projects.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ CaseManagementAPI
constructor
A new instance of CaseManagementAPI.
-
#search_cases(opts = {}) ⇒ Object
Search cases.
-
#search_cases_with_http_info(opts = {}) ⇒ Array<(CasesResponse, Integer, Hash)>
Search cases.
-
#search_cases_with_pagination(opts = {}) {|Case| ... } ⇒ Object
Search cases.
-
#unarchive_case(case_id, body, opts = {}) ⇒ Object
Unarchive case.
-
#unarchive_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Unarchive case.
-
#unassign_case(case_id, body, opts = {}) ⇒ Object
Unassign case.
-
#unassign_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Unassign case.
-
#update_priority(case_id, body, opts = {}) ⇒ Object
Update case priority.
-
#update_priority_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case priority.
-
#update_status(case_id, body, opts = {}) ⇒ Object
Update case status.
-
#update_status_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case status.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ CaseManagementAPI
Returns a new instance of CaseManagementAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 22 def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
20 21 22 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#archive_case(case_id, body, opts = {}) ⇒ Object
Archive case.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 29 def archive_case(case_id, body, opts = {}) data, _status_code, _headers = archive_case_with_http_info(case_id, body, opts) data end |
#archive_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Archive case.
Archive case
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 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 42 def archive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :archive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#assign_case(case_id, body, opts = {}) ⇒ Object
Assign case.
101 102 103 104 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 101 def assign_case(case_id, body, opts = {}) data, _status_code, _headers = assign_case_with_http_info(case_id, body, opts) data end |
#assign_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Assign case.
Assign case to a user
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 114 def assign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :assign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_case(body, opts = {}) ⇒ Object
Create a case.
173 174 175 176 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 173 def create_case(body, opts = {}) data, _status_code, _headers = create_case_with_http_info(body, opts) data end |
#create_case_with_http_info(body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Create a case.
Create a Case
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 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 185 def create_case_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case" end # resource path local_var_path = '/api/v2/cases' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_project(body, opts = {}) ⇒ Object
Create a project.
240 241 242 243 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 240 def create_project(body, opts = {}) data, _status_code, _headers = create_project_with_http_info(body, opts) data end |
#create_project_with_http_info(body, opts = {}) ⇒ Array<(ProjectResponse, Integer, Hash)>
Create a project.
Create a project.
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 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 252 def create_project_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project" end # resource path local_var_path = '/api/v2/cases/projects' # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'ProjectResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_project(project_id, opts = {}) ⇒ Object
Remove a project.
307 308 309 310 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 307 def delete_project(project_id, opts = {}) delete_project_with_http_info(project_id, opts) nil end |
#delete_project_with_http_info(project_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Remove a project.
Remove a project using the project's id
.
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 319 def delete_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project" end # resource path local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # 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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_case(case_id, opts = {}) ⇒ Object
Get the details of a case.
372 373 374 375 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 372 def get_case(case_id, opts = {}) data, _status_code, _headers = get_case_with_http_info(case_id, opts) data end |
#get_case_with_http_info(case_id, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Get the details of a case.
Get the details of case by case_id
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 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 384 def get_case_with_http_info(case_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case" end # resource path local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_project(project_id, opts = {}) ⇒ Object
Get the details of a project.
437 438 439 440 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 437 def get_project(project_id, opts = {}) data, _status_code, _headers = get_project_with_http_info(project_id, opts) data end |
#get_project_with_http_info(project_id, opts = {}) ⇒ Array<(ProjectResponse, Integer, Hash)>
Get the details of a project.
Get the details of a project by project_id
.
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 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 449 def get_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project" end # resource path local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_projects(opts = {}) ⇒ Object
Get all projects.
502 503 504 505 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 502 def get_projects(opts = {}) data, _status_code, _headers = get_projects_with_http_info(opts) data end |
#get_projects_with_http_info(opts = {}) ⇒ Array<(ProjectsResponse, Integer, Hash)>
Get all projects.
Get all projects.
513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 513 def get_projects_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...' end # resource path local_var_path = '/api/v2/cases/projects' # 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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ProjectsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_projects, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_cases(opts = {}) ⇒ Object
Search cases.
562 563 564 565 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 562 def search_cases(opts = {}) data, _status_code, _headers = search_cases_with_http_info(opts) data end |
#search_cases_with_http_info(opts = {}) ⇒ Array<(CasesResponse, Integer, Hash)>
Search cases.
Search cases.
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 578 def search_cases_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...' end allowable_values = ['created_at', 'priority', 'status'] if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field']) fail ArgumentError, "invalid value for \"sort_field\", must be one of #{allowable_values}" end # resource path local_var_path = '/api/v2/cases' # query parameters query_params = opts[:query_params] || {} query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'sort[field]'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'sort[asc]'] = opts[:'sort_asc'] if !opts[:'sort_asc'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'CasesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :search_cases, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search_cases_with_pagination(opts = {}) {|Case| ... } ⇒ Object
Search cases.
Provide a paginated version of #search_cases, returning all items.
To use it you need to use a block: search_cases_with_pagination { |item| p item }
640 641 642 643 644 645 646 647 648 649 650 651 652 653 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 640 def search_cases_with_pagination(opts = {}) api_version = "V2" page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) while true do response = search_cases(opts) @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "data").length < page_size break end @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) end end |
#unarchive_case(case_id, body, opts = {}) ⇒ Object
Unarchive case.
658 659 660 661 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 658 def unarchive_case(case_id, body, opts = {}) data, _status_code, _headers = unarchive_case_with_http_info(case_id, body, opts) data end |
#unarchive_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Unarchive case.
Unarchive case
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 671 def unarchive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unarchive_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :unarchive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unassign_case(case_id, body, opts = {}) ⇒ Object
Unassign case.
730 731 732 733 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 730 def unassign_case(case_id, body, opts = {}) data, _status_code, _headers = unassign_case_with_http_info(case_id, body, opts) data end |
#unassign_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Unassign case.
Unassign case
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 743 def unassign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unassign_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :unassign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_priority(case_id, body, opts = {}) ⇒ Object
Update case priority.
802 803 804 805 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 802 def update_priority(case_id, body, opts = {}) data, _status_code, _headers = update_priority_with_http_info(case_id, body, opts) data end |
#update_priority_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case priority.
Update case priority
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 815 def update_priority_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_priority ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_priority" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_priority" end # resource path local_var_path = '/api/v2/cases/{case_id}/priority'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_priority, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#update_priority\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_status(case_id, body, opts = {}) ⇒ Object
Update case status.
874 875 876 877 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 874 def update_status(case_id, body, opts = {}) data, _status_code, _headers = update_status_with_http_info(case_id, body, opts) data end |
#update_status_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case status.
Update case status
887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 887 def update_status_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_status ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_status" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_status" end # resource path local_var_path = '/api/v2/cases/{case_id}/status'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # 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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_status, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type, :api_version => "V2" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: CaseManagementAPI#update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |