Class: DatadogAPIClient::V2::ReportSchedulesAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V2::ReportSchedulesAPI
- Defined in:
- lib/datadog_api_client/v2/api/report_schedules_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_report_schedule(body, opts = {}) ⇒ Object
Create a report schedule.
-
#create_report_schedule_with_http_info(body, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Create a report schedule.
-
#delete_report_schedule(schedule_uuid, opts = {}) ⇒ Object
Delete a report schedule.
-
#delete_report_schedule_with_http_info(schedule_uuid, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Delete a report schedule.
-
#get_report_schedule(schedule_uuid, opts = {}) ⇒ Object
Get a report schedule.
-
#get_report_schedule_with_http_info(schedule_uuid, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Get a report schedule.
-
#get_report_schedules_for_resource(resource_type, resource_id, opts = {}) ⇒ Object
Get report schedules for a resource.
-
#get_report_schedules_for_resource_with_http_info(resource_type, resource_id, opts = {}) ⇒ Array<(ReportScheduleListResponse, Integer, Hash)>
Get report schedules for a resource.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ ReportSchedulesAPI
constructor
A new instance of ReportSchedulesAPI.
-
#list_dataset_report_schedules(dataset_id, opts = {}) ⇒ Object
List dataset report schedules.
-
#list_dataset_report_schedules_with_http_info(dataset_id, opts = {}) ⇒ Array<(DatasetReportScheduleListResponse, Integer, Hash)>
List dataset report schedules.
-
#list_report_schedules(opts = {}) ⇒ Object
List report schedules.
-
#list_report_schedules_with_http_info(opts = {}) ⇒ Array<(ReportScheduleListResponse, Integer, Hash)>
List report schedules.
-
#patch_report_schedule(schedule_uuid, body, opts = {}) ⇒ Object
Update a report schedule.
-
#patch_report_schedule_with_http_info(schedule_uuid, body, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Update a report schedule.
-
#print_report(body, opts = {}) ⇒ Object
Print a report.
-
#print_report_with_http_info(body, opts = {}) ⇒ Array<(PrintReportResponse, Integer, Hash)>
Print a report.
-
#toggle_report_schedule(schedule_uuid, body, opts = {}) ⇒ Object
Toggle a report schedule.
-
#toggle_report_schedule_with_http_info(schedule_uuid, body, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Toggle a report schedule.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ ReportSchedulesAPI
Returns a new instance of ReportSchedulesAPI.
22 23 24 |
# File 'lib/datadog_api_client/v2/api/report_schedules_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/report_schedules_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#create_report_schedule(body, opts = {}) ⇒ Object
Create a report schedule.
29 30 31 32 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 29 def create_report_schedule(body, opts = {}) data, _status_code, _headers = create_report_schedule_with_http_info(body, opts) data end |
#create_report_schedule_with_http_info(body, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Create a report schedule.
Create a new scheduled report. A schedule renders a dashboard or integration dashboard
on a recurring cadence and delivers it to the configured recipients over email, Slack,
or Microsoft Teams.
Requires the generate_dashboard_reports permission.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 44 def create_report_schedule_with_http_info(body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.create_report_schedule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_report_schedule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_report_schedule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.create_report_schedule ...' 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 ReportSchedulesAPI.create_report_schedule" end # resource path local_var_path = '/api/v2/reporting/schedule' # 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] || 'ReportScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :create_report_schedule, :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: ReportSchedulesAPI#create_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_report_schedule(schedule_uuid, opts = {}) ⇒ Object
Delete a report schedule.
105 106 107 108 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 105 def delete_report_schedule(schedule_uuid, opts = {}) data, _status_code, _headers = delete_report_schedule_with_http_info(schedule_uuid, opts) data end |
#delete_report_schedule_with_http_info(schedule_uuid, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Delete a report schedule.
Delete a report schedule by its unique identifier. The response returns the deleted schedule. Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.
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 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 118 def delete_report_schedule_with_http_info(schedule_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.delete_report_schedule ...' end # verify the required parameter 'schedule_uuid' is set if @api_client.config.client_side_validation && schedule_uuid.nil? fail ArgumentError, "Missing the required parameter 'schedule_uuid' when calling ReportSchedulesAPI.delete_report_schedule" end # resource path local_var_path = '/api/v2/reporting/schedule/{schedule_uuid}'.sub('{schedule_uuid}', CGI.escape(schedule_uuid.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] || 'ReportScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :delete_report_schedule, :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: ReportSchedulesAPI#delete_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report_schedule(schedule_uuid, opts = {}) ⇒ Object
Get a report schedule.
171 172 173 174 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 171 def get_report_schedule(schedule_uuid, opts = {}) data, _status_code, _headers = get_report_schedule_with_http_info(schedule_uuid, opts) data end |
#get_report_schedule_with_http_info(schedule_uuid, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Get a report schedule.
Get a report schedule by its unique identifier. Requires a reporting read permission appropriate to the targeted resource type.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 184 def get_report_schedule_with_http_info(schedule_uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.get_report_schedule ...' end # verify the required parameter 'schedule_uuid' is set if @api_client.config.client_side_validation && schedule_uuid.nil? fail ArgumentError, "Missing the required parameter 'schedule_uuid' when calling ReportSchedulesAPI.get_report_schedule" end # resource path local_var_path = '/api/v2/reporting/schedule/{schedule_uuid}'.sub('{schedule_uuid}', CGI.escape(schedule_uuid.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] || 'ReportScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_report_schedule, :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: ReportSchedulesAPI#get_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_report_schedules_for_resource(resource_type, resource_id, opts = {}) ⇒ Object
Get report schedules for a resource.
237 238 239 240 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 237 def get_report_schedules_for_resource(resource_type, resource_id, opts = {}) data, _status_code, _headers = get_report_schedules_for_resource_with_http_info(resource_type, resource_id, opts) data end |
#get_report_schedules_for_resource_with_http_info(resource_type, resource_id, opts = {}) ⇒ Array<(ReportScheduleListResponse, Integer, Hash)>
Get report schedules for a resource.
Get all report schedules that target a dashboard or integration dashboard resource. Requires a reporting read permission appropriate to the targeted resource type.
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 251 def get_report_schedules_for_resource_with_http_info(resource_type, resource_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.get_report_schedules_for_resource ...' end # verify the required parameter 'resource_type' is set if @api_client.config.client_side_validation && resource_type.nil? fail ArgumentError, "Missing the required parameter 'resource_type' when calling ReportSchedulesAPI.get_report_schedules_for_resource" end # verify enum value allowable_values = ['dashboard', 'integration_dashboard'] if @api_client.config.client_side_validation && !allowable_values.include?(resource_type) fail ArgumentError, "invalid value for \"resource_type\", must be one of #{allowable_values}" end # verify the required parameter 'resource_id' is set if @api_client.config.client_side_validation && resource_id.nil? fail ArgumentError, "Missing the required parameter 'resource_id' when calling ReportSchedulesAPI.get_report_schedules_for_resource" end # resource path local_var_path = '/api/v2/reporting/schedule/{resource_type}/{resource_id}'.sub('{resource_type}', CGI.escape(resource_type.to_s).gsub('%2F', '/')).sub('{resource_id}', CGI.escape(resource_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] || 'ReportScheduleListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_report_schedules_for_resource, :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: ReportSchedulesAPI#get_report_schedules_for_resource\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_dataset_report_schedules(dataset_id, opts = {}) ⇒ Object
List dataset report schedules.
313 314 315 316 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 313 def list_dataset_report_schedules(dataset_id, opts = {}) data, _status_code, _headers = list_dataset_report_schedules_with_http_info(dataset_id, opts) data end |
#list_dataset_report_schedules_with_http_info(dataset_id, opts = {}) ⇒ Array<(DatasetReportScheduleListResponse, Integer, Hash)>
List dataset report schedules.
Retrieve all report schedules for a given published dataset.
Returns report schedules belonging to the authenticated user's organization that target the specified dataset.
Requires the generate_log_reports or manage_log_reports permission.
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 368 369 370 371 372 373 374 375 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 327 def list_dataset_report_schedules_with_http_info(dataset_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.list_dataset_report_schedules ...' end # verify the required parameter 'dataset_id' is set if @api_client.config.client_side_validation && dataset_id.nil? fail ArgumentError, "Missing the required parameter 'dataset_id' when calling ReportSchedulesAPI.list_dataset_report_schedules" end # resource path local_var_path = '/api/v2/reporting/dataset/{dataset_id}/schedules'.sub('{dataset_id}', CGI.escape(dataset_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] || 'DatasetReportScheduleListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_dataset_report_schedules, :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: ReportSchedulesAPI#list_dataset_report_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_report_schedules(opts = {}) ⇒ Object
List report schedules.
380 381 382 383 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 380 def list_report_schedules(opts = {}) data, _status_code, _headers = list_report_schedules_with_http_info(opts) data end |
#list_report_schedules_with_http_info(opts = {}) ⇒ Array<(ReportScheduleListResponse, Integer, Hash)>
List report schedules.
List dashboard and integration dashboard report schedules for the organization.
The response is paginated and can be filtered by title, author UUID, or recipients.
Requires the generate_dashboard_reports permission.
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 445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 398 def list_report_schedules_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.list_report_schedules ...' end if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 50 fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ReportSchedulesAPI.list_report_schedules, must be smaller than or equal to 50.' end if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling ReportSchedulesAPI.list_report_schedules, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_offset'].nil? && opts[:'page_offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"page_offset"]" when calling ReportSchedulesAPI.list_report_schedules, must be greater than or equal to 0.' end # resource path local_var_path = '/api/v2/reporting/schedule/list' # query parameters query_params = opts[:query_params] || {} query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? query_params[:'filter[title]'] = opts[:'filter_title'] if !opts[:'filter_title'].nil? query_params[:'filter[author_uuid]'] = opts[:'filter_author_uuid'] if !opts[:'filter_author_uuid'].nil? query_params[:'filter[recipients]'] = opts[:'filter_recipients'] if !opts[:'filter_recipients'].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] || 'ReportScheduleListResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :list_report_schedules, :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: ReportSchedulesAPI#list_report_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_report_schedule(schedule_uuid, body, opts = {}) ⇒ Object
Update a report schedule.
461 462 463 464 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 461 def patch_report_schedule(schedule_uuid, body, opts = {}) data, _status_code, _headers = patch_report_schedule_with_http_info(schedule_uuid, body, opts) data end |
#patch_report_schedule_with_http_info(schedule_uuid, body, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Update a report schedule.
Update an existing scheduled report by its identifier. The editable attributes
are replaced with the supplied values; the targeted resource (resource_id and
resource_type) cannot be changed after creation.
Requires the generate_dashboard_reports permission and schedule ownership.
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 477 def patch_report_schedule_with_http_info(schedule_uuid, body, opts = {}) unstable_enabled = @api_client.config.unstable_operations["v2.patch_report_schedule".to_sym] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.patch_report_schedule") else raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.patch_report_schedule")) end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.patch_report_schedule ...' end # verify the required parameter 'schedule_uuid' is set if @api_client.config.client_side_validation && schedule_uuid.nil? fail ArgumentError, "Missing the required parameter 'schedule_uuid' when calling ReportSchedulesAPI.patch_report_schedule" 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 ReportSchedulesAPI.patch_report_schedule" end # resource path local_var_path = '/api/v2/reporting/schedule/{schedule_uuid}'.sub('{schedule_uuid}', CGI.escape(schedule_uuid.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] || 'ReportScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :patch_report_schedule, :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::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportSchedulesAPI#patch_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#print_report(body, opts = {}) ⇒ Object
Print a report.
542 543 544 545 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 542 def print_report(body, opts = {}) data, _status_code, _headers = print_report_with_http_info(body, opts) data end |
#print_report_with_http_info(body, opts = {}) ⇒ Array<(PrintReportResponse, Integer, Hash)>
Print a report.
Initiate a one-off, print-only report for a dashboard or integration dashboard. The report is rendered as a PDF and made available for download through the URL returned in the response. Requires a reporting permission appropriate to the targeted resource type.
556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 556 def print_report_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.print_report ...' 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 ReportSchedulesAPI.print_report" end # resource path local_var_path = '/api/v2/reporting/print' # 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] || 'PrintReportResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :print_report, :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: ReportSchedulesAPI#print_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#toggle_report_schedule(schedule_uuid, body, opts = {}) ⇒ Object
Toggle a report schedule.
611 612 613 614 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 611 def toggle_report_schedule(schedule_uuid, body, opts = {}) data, _status_code, _headers = toggle_report_schedule_with_http_info(schedule_uuid, body, opts) data end |
#toggle_report_schedule_with_http_info(schedule_uuid, body, opts = {}) ⇒ Array<(ReportScheduleResponse, Integer, Hash)>
Toggle a report schedule.
Activate or pause a report schedule by setting its status to active or inactive.
Requires a reporting write permission appropriate to the targeted resource type and schedule ownership.
625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'lib/datadog_api_client/v2/api/report_schedules_api.rb', line 625 def toggle_report_schedule_with_http_info(schedule_uuid, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ReportSchedulesAPI.toggle_report_schedule ...' end # verify the required parameter 'schedule_uuid' is set if @api_client.config.client_side_validation && schedule_uuid.nil? fail ArgumentError, "Missing the required parameter 'schedule_uuid' when calling ReportSchedulesAPI.toggle_report_schedule" 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 ReportSchedulesAPI.toggle_report_schedule" end # resource path local_var_path = '/api/v2/reporting/schedule/{schedule_uuid}/toggle'.sub('{schedule_uuid}', CGI.escape(schedule_uuid.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] || 'ReportScheduleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :toggle_report_schedule, :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::Patch, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ReportSchedulesAPI#toggle_report_schedule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |