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.
-
#comment_case(case_id, body, opts = {}) ⇒ Object
Comment case.
-
#comment_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(TimelineResponse, Integer, Hash)>
Comment 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_case_comment(case_id, cell_id, opts = {}) ⇒ Object
Delete case comment.
-
#delete_case_comment_with_http_info(case_id, cell_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete case comment.
-
#delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) ⇒ Object
Delete custom attribute from case.
-
#delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Delete custom attribute from case.
-
#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_attributes(case_id, body, opts = {}) ⇒ Object
Update case attributes.
-
#update_attributes_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case attributes.
-
#update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) ⇒ Object
Update case custom attribute.
-
#update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case custom attribute.
-
#update_case_description(case_id, body, opts = {}) ⇒ Object
Update case description.
-
#update_case_description_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case description.
-
#update_case_title(case_id, body, opts = {}) ⇒ Object
Update case title.
-
#update_case_title_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case title.
-
#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 |
#comment_case(case_id, body, opts = {}) ⇒ Object
Comment case.
173 174 175 176 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 173 def comment_case(case_id, body, opts = {}) data, _status_code, _headers = comment_case_with_http_info(case_id, body, opts) data end |
#comment_case_with_http_info(case_id, body, opts = {}) ⇒ Array<(TimelineResponse, Integer, Hash)>
Comment case.
Comment case
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 236 237 238 239 240 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 186 def comment_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.comment_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.comment_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.comment_case" end # resource path local_var_path = '/api/v2/cases/{case_id}/comment'.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] || 'TimelineResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :comment_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#comment_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_case_comment(case_id, cell_id, opts = {}) ⇒ Object
Delete case comment.
379 380 381 382 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 379 def delete_case_comment(case_id, cell_id, opts = {}) delete_case_comment_with_http_info(case_id, cell_id, opts) nil end |
#delete_case_comment_with_http_info(case_id, cell_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete case comment.
Delete case comment
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 433 434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 392 def delete_case_comment_with_http_info(case_id, cell_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_comment ...' 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.delete_case_comment" end # verify the required parameter 'cell_id' is set if @api_client.config.client_side_validation && cell_id.nil? fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.delete_case_comment" end # resource path local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_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] = opts.merge( :operation => :delete_case_comment, :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_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) ⇒ Object
Delete custom attribute from case.
449 450 451 452 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 449 def delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) data, _status_code, _headers = delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts) data end |
#delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Delete custom attribute from case.
Delete custom attribute from case
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 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 462 def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_custom_attribute ...' 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.delete_case_custom_attribute" end # verify the required parameter 'custom_attribute_key' is set if @api_client.config.client_side_validation && custom_attribute_key.nil? fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.delete_case_custom_attribute" end # resource path local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.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 => :delete_case_custom_attribute, :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_case_custom_attribute\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_attributes(case_id, body, opts = {}) ⇒ Object
Update case attributes.
1014 1015 1016 1017 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1014 def update_attributes(case_id, body, opts = {}) data, _status_code, _headers = update_attributes_with_http_info(case_id, body, opts) data end |
#update_attributes_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case attributes.
Update case attributes
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1027 def update_attributes_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_attributes ...' 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_attributes" 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_attributes" end # resource path local_var_path = '/api/v2/cases/{case_id}/attributes'.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_attributes, :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_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) ⇒ Object
Update case custom attribute.
1086 1087 1088 1089 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1086 def update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) data, _status_code, _headers = update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts) data end |
#update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case custom attribute.
Update case custom attribute
1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1100 def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_custom_attribute ...' 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_case_custom_attribute" end # verify the required parameter 'custom_attribute_key' is set if @api_client.config.client_side_validation && custom_attribute_key.nil? fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.update_case_custom_attribute" 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_case_custom_attribute" end # resource path local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.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_case_custom_attribute, :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_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_case_description(case_id, body, opts = {}) ⇒ Object
Update case description.
1163 1164 1165 1166 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1163 def update_case_description(case_id, body, opts = {}) data, _status_code, _headers = update_case_description_with_http_info(case_id, body, opts) data end |
#update_case_description_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case description.
Update case description
1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1176 def update_case_description_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' 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_case_description" 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_case_description" end # resource path local_var_path = '/api/v2/cases/{case_id}/description'.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_case_description, :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_case_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_case_title(case_id, body, opts = {}) ⇒ Object
Update case title.
1235 1236 1237 1238 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1235 def update_case_title(case_id, body, opts = {}) data, _status_code, _headers = update_case_title_with_http_info(case_id, body, opts) data end |
#update_case_title_with_http_info(case_id, body, opts = {}) ⇒ Array<(CaseResponse, Integer, Hash)>
Update case title.
Update case title
1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
# File 'lib/datadog_api_client/v2/api/case_management_api.rb', line 1248 def update_case_title_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_title ...' 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_case_title" 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_case_title" end # resource path local_var_path = '/api/v2/cases/{case_id}/title'.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_case_title, :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_case_title\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 |