Class: DatadogAPIClient::V1::SyntheticsAPI
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::SyntheticsAPI
- Defined in:
- lib/datadog_api_client/v1/api/synthetics_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_global_variable(body, opts = {}) ⇒ Object
Create a global variable.
-
#create_global_variable_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsGlobalVariable, Integer, Hash)>
Create a global variable.
-
#create_private_location(body, opts = {}) ⇒ Object
Create a private location.
-
#create_private_location_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsPrivateLocationCreationResponse, Integer, Hash)>
Create a private location.
-
#create_synthetics_api_test(body, opts = {}) ⇒ Object
Create an API test.
-
#create_synthetics_api_test_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsAPITest, Integer, Hash)>
Create an API test.
-
#create_synthetics_browser_test(body, opts = {}) ⇒ Object
Create a browser test.
-
#create_synthetics_browser_test_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsBrowserTest, Integer, Hash)>
Create a browser test.
-
#delete_global_variable(variable_id, opts = {}) ⇒ Object
Delete a global variable.
-
#delete_global_variable_with_http_info(variable_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a global variable.
-
#delete_private_location(location_id, opts = {}) ⇒ Object
Delete a private location.
-
#delete_private_location_with_http_info(location_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a private location.
-
#delete_tests(body, opts = {}) ⇒ Object
Delete tests.
-
#delete_tests_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsDeleteTestsResponse, Integer, Hash)>
Delete tests.
-
#edit_global_variable(variable_id, body, opts = {}) ⇒ Object
Edit a global variable.
-
#edit_global_variable_with_http_info(variable_id, body, opts = {}) ⇒ Array<(SyntheticsGlobalVariable, Integer, Hash)>
Edit a global variable.
-
#get_api_test(public_id, opts = {}) ⇒ Object
Get an API test.
-
#get_api_test_latest_results(public_id, opts = {}) ⇒ Object
Get an API test’s latest results summaries.
-
#get_api_test_latest_results_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsGetAPITestLatestResultsResponse, Integer, Hash)>
Get an API test’s latest results summaries.
-
#get_api_test_result(public_id, result_id, opts = {}) ⇒ Object
Get an API test result.
-
#get_api_test_result_with_http_info(public_id, result_id, opts = {}) ⇒ Array<(SyntheticsAPITestResultFull, Integer, Hash)>
Get an API test result.
-
#get_api_test_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsAPITest, Integer, Hash)>
Get an API test.
-
#get_browser_test(public_id, opts = {}) ⇒ Object
Get a browser test.
-
#get_browser_test_latest_results(public_id, opts = {}) ⇒ Object
Get a browser test’s latest results summaries.
-
#get_browser_test_latest_results_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsGetBrowserTestLatestResultsResponse, Integer, Hash)>
Get a browser test’s latest results summaries.
-
#get_browser_test_result(public_id, result_id, opts = {}) ⇒ Object
Get a browser test result.
-
#get_browser_test_result_with_http_info(public_id, result_id, opts = {}) ⇒ Array<(SyntheticsBrowserTestResultFull, Integer, Hash)>
Get a browser test result.
-
#get_browser_test_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsBrowserTest, Integer, Hash)>
Get a browser test.
-
#get_global_variable(variable_id, opts = {}) ⇒ Object
Get a global variable.
-
#get_global_variable_with_http_info(variable_id, opts = {}) ⇒ Array<(SyntheticsGlobalVariable, Integer, Hash)>
Get a global variable.
-
#get_private_location(location_id, opts = {}) ⇒ Object
Get a private location.
-
#get_private_location_with_http_info(location_id, opts = {}) ⇒ Array<(SyntheticsPrivateLocation, Integer, Hash)>
Get a private location.
-
#get_synthetics_ci_batch(batch_id, opts = {}) ⇒ Object
Get details of batch.
-
#get_synthetics_ci_batch_with_http_info(batch_id, opts = {}) ⇒ Array<(SyntheticsBatchDetails, Integer, Hash)>
Get details of batch.
-
#get_synthetics_default_locations(opts = {}) ⇒ Object
Get the default locations.
-
#get_synthetics_default_locations_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
Get the default locations.
-
#get_test(public_id, opts = {}) ⇒ Object
Get a test configuration.
-
#get_test_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsTestDetails, Integer, Hash)>
Get a test configuration.
-
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ SyntheticsAPI
constructor
A new instance of SyntheticsAPI.
-
#list_global_variables(opts = {}) ⇒ Object
Get all global variables.
-
#list_global_variables_with_http_info(opts = {}) ⇒ Array<(SyntheticsListGlobalVariablesResponse, Integer, Hash)>
Get all global variables.
-
#list_locations(opts = {}) ⇒ Object
Get all locations (public and private).
-
#list_locations_with_http_info(opts = {}) ⇒ Array<(SyntheticsLocations, Integer, Hash)>
Get all locations (public and private).
-
#list_tests(opts = {}) ⇒ Object
Get the list of all Synthetic tests.
-
#list_tests_with_http_info(opts = {}) ⇒ Array<(SyntheticsListTestsResponse, Integer, Hash)>
Get the list of all Synthetic tests.
-
#list_tests_with_pagination(opts = {}) {|SyntheticsTestDetails| ... } ⇒ Object
Get the list of all Synthetic tests.
-
#patch_test(public_id, body, opts = {}) ⇒ Object
Patch a Synthetic test.
-
#patch_test_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsTestDetails, Integer, Hash)>
Patch a Synthetic test.
-
#trigger_ci_tests(body, opts = {}) ⇒ Object
Trigger tests from CI/CD pipelines.
-
#trigger_ci_tests_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsTriggerCITestsResponse, Integer, Hash)>
Trigger tests from CI/CD pipelines.
-
#trigger_tests(body, opts = {}) ⇒ Object
Trigger Synthetic tests.
-
#trigger_tests_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsTriggerCITestsResponse, Integer, Hash)>
Trigger Synthetic tests.
-
#update_api_test(public_id, body, opts = {}) ⇒ Object
Edit an API test.
-
#update_api_test_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsAPITest, Integer, Hash)>
Edit an API test.
-
#update_browser_test(public_id, body, opts = {}) ⇒ Object
Edit a browser test.
-
#update_browser_test_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsBrowserTest, Integer, Hash)>
Edit a browser test.
-
#update_private_location(location_id, body, opts = {}) ⇒ Object
Edit a private location.
-
#update_private_location_with_http_info(location_id, body, opts = {}) ⇒ Array<(SyntheticsPrivateLocation, Integer, Hash)>
Edit a private location.
-
#update_test_pause_status(public_id, body, opts = {}) ⇒ Object
Pause or start a test.
-
#update_test_pause_status_with_http_info(public_id, body, opts = {}) ⇒ Array<(Boolean, Integer, Hash)>
Pause or start a test.
Constructor Details
#initialize(api_client = DatadogAPIClient::APIClient.default) ⇒ SyntheticsAPI
Returns a new instance of SyntheticsAPI.
22 23 24 |
# File 'lib/datadog_api_client/v1/api/synthetics_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/v1/api/synthetics_api.rb', line 20 def api_client @api_client end |
Instance Method Details
#create_global_variable(body, opts = {}) ⇒ Object
Create a global variable.
29 30 31 32 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 29 def create_global_variable(body, opts = {}) data, _status_code, _headers = create_global_variable_with_http_info(body, opts) data end |
#create_global_variable_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsGlobalVariable, Integer, Hash)>
Create a global variable.
Create a Synthetic global variable.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 41 def create_global_variable_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.create_global_variable ...' 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 SyntheticsAPI.create_global_variable" end # resource path local_var_path = '/api/v1/synthetics/variables' # 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] || 'SyntheticsGlobalVariable' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_global_variable, :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 => "V1" ) 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: SyntheticsAPI#create_global_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_private_location(body, opts = {}) ⇒ Object
Create a private location.
96 97 98 99 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 96 def create_private_location(body, opts = {}) data, _status_code, _headers = create_private_location_with_http_info(body, opts) data end |
#create_private_location_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsPrivateLocationCreationResponse, Integer, Hash)>
Create a private location.
Create a new Synthetic private location.
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 108 def create_private_location_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.create_private_location ...' 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 SyntheticsAPI.create_private_location" end # resource path local_var_path = '/api/v1/synthetics/private-locations' # 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] || 'SyntheticsPrivateLocationCreationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_private_location, :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 => "V1" ) 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: SyntheticsAPI#create_private_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_synthetics_api_test(body, opts = {}) ⇒ Object
Create an API test.
163 164 165 166 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 163 def create_synthetics_api_test(body, opts = {}) data, _status_code, _headers = create_synthetics_api_test_with_http_info(body, opts) data end |
#create_synthetics_api_test_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsAPITest, Integer, Hash)>
Create an API test.
Create a Synthetic API test.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 175 def create_synthetics_api_test_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.create_synthetics_api_test ...' 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 SyntheticsAPI.create_synthetics_api_test" end # resource path local_var_path = '/api/v1/synthetics/tests/api' # 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] || 'SyntheticsAPITest' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_synthetics_api_test, :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 => "V1" ) 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: SyntheticsAPI#create_synthetics_api_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_synthetics_browser_test(body, opts = {}) ⇒ Object
Create a browser test.
230 231 232 233 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 230 def create_synthetics_browser_test(body, opts = {}) data, _status_code, _headers = create_synthetics_browser_test_with_http_info(body, opts) data end |
#create_synthetics_browser_test_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsBrowserTest, Integer, Hash)>
Create a browser test.
Create a Synthetic browser test.
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 242 def create_synthetics_browser_test_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.create_synthetics_browser_test ...' 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 SyntheticsAPI.create_synthetics_browser_test" end # resource path local_var_path = '/api/v1/synthetics/tests/browser' # 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] || 'SyntheticsBrowserTest' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :create_synthetics_browser_test, :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 => "V1" ) 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: SyntheticsAPI#create_synthetics_browser_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_global_variable(variable_id, opts = {}) ⇒ Object
Delete a global variable.
297 298 299 300 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 297 def delete_global_variable(variable_id, opts = {}) delete_global_variable_with_http_info(variable_id, opts) nil end |
#delete_global_variable_with_http_info(variable_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a global variable.
Delete a Synthetic global variable.
309 310 311 312 313 314 315 316 317 318 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 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 309 def delete_global_variable_with_http_info(variable_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.delete_global_variable ...' end # verify the required parameter 'variable_id' is set if @api_client.config.client_side_validation && variable_id.nil? fail ArgumentError, "Missing the required parameter 'variable_id' when calling SyntheticsAPI.delete_global_variable" end # resource path local_var_path = '/api/v1/synthetics/variables/{variable_id}'.sub('{variable_id}', CGI.escape(variable_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_global_variable, :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 => "V1" ) 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: SyntheticsAPI#delete_global_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_private_location(location_id, opts = {}) ⇒ Object
Delete a private location.
362 363 364 365 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 362 def delete_private_location(location_id, opts = {}) delete_private_location_with_http_info(location_id, opts) nil end |
#delete_private_location_with_http_info(location_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a private location.
Delete a Synthetic private location.
374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 374 def delete_private_location_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.delete_private_location ...' end # verify the required parameter 'location_id' is set if @api_client.config.client_side_validation && location_id.nil? fail ArgumentError, "Missing the required parameter 'location_id' when calling SyntheticsAPI.delete_private_location" end # resource path local_var_path = '/api/v1/synthetics/private-locations/{location_id}'.sub('{location_id}', CGI.escape(location_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_private_location, :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 => "V1" ) 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: SyntheticsAPI#delete_private_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_tests(body, opts = {}) ⇒ Object
Delete tests.
427 428 429 430 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 427 def delete_tests(body, opts = {}) data, _status_code, _headers = delete_tests_with_http_info(body, opts) data end |
#delete_tests_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsDeleteTestsResponse, Integer, Hash)>
Delete tests.
Delete multiple Synthetic tests by ID.
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 439 def delete_tests_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.delete_tests ...' 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 SyntheticsAPI.delete_tests" end # resource path local_var_path = '/api/v1/synthetics/tests/delete' # 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] || 'SyntheticsDeleteTestsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :delete_tests, :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 => "V1" ) 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: SyntheticsAPI#delete_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#edit_global_variable(variable_id, body, opts = {}) ⇒ Object
Edit a global variable.
494 495 496 497 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 494 def edit_global_variable(variable_id, body, opts = {}) data, _status_code, _headers = edit_global_variable_with_http_info(variable_id, body, opts) data end |
#edit_global_variable_with_http_info(variable_id, body, opts = {}) ⇒ Array<(SyntheticsGlobalVariable, Integer, Hash)>
Edit a global variable.
Edit a Synthetic global variable.
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 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 507 def edit_global_variable_with_http_info(variable_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.edit_global_variable ...' end # verify the required parameter 'variable_id' is set if @api_client.config.client_side_validation && variable_id.nil? fail ArgumentError, "Missing the required parameter 'variable_id' when calling SyntheticsAPI.edit_global_variable" 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 SyntheticsAPI.edit_global_variable" end # resource path local_var_path = '/api/v1/synthetics/variables/{variable_id}'.sub('{variable_id}', CGI.escape(variable_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] || 'SyntheticsGlobalVariable' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :edit_global_variable, :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 => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SyntheticsAPI#edit_global_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_api_test(public_id, opts = {}) ⇒ Object
Get an API test.
566 567 568 569 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 566 def get_api_test(public_id, opts = {}) data, _status_code, _headers = get_api_test_with_http_info(public_id, opts) data end |
#get_api_test_latest_results(public_id, opts = {}) ⇒ Object
Get an API test’s latest results summaries.
632 633 634 635 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 632 def get_api_test_latest_results(public_id, opts = {}) data, _status_code, _headers = get_api_test_latest_results_with_http_info(public_id, opts) data end |
#get_api_test_latest_results_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsGetAPITestLatestResultsResponse, Integer, Hash)>
Get an API test’s latest results summaries.
Get the last 150 test results summaries for a given Synthetic API test.
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 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 647 def get_api_test_latest_results_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_api_test_latest_results ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_api_test_latest_results" end # resource path local_var_path = '/api/v1/synthetics/tests/{public_id}/results'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'from_ts'] = opts[:'from_ts'] if !opts[:'from_ts'].nil? query_params[:'to_ts'] = opts[:'to_ts'] if !opts[:'to_ts'].nil? query_params[:'probe_dc'] = @api_client.build_collection_param(opts[:'probe_dc'], :multi) if !opts[:'probe_dc'].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] || 'SyntheticsGetAPITestLatestResultsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_api_test_latest_results, :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 => "V1" ) 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: SyntheticsAPI#get_api_test_latest_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_api_test_result(public_id, result_id, opts = {}) ⇒ Object
Get an API test result.
703 704 705 706 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 703 def get_api_test_result(public_id, result_id, opts = {}) data, _status_code, _headers = get_api_test_result_with_http_info(public_id, result_id, opts) data end |
#get_api_test_result_with_http_info(public_id, result_id, opts = {}) ⇒ Array<(SyntheticsAPITestResultFull, Integer, Hash)>
Get an API test result.
Get a specific full result from a given Synthetic API test.
716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 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 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 716 def get_api_test_result_with_http_info(public_id, result_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_api_test_result ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_api_test_result" end # verify the required parameter 'result_id' is set if @api_client.config.client_side_validation && result_id.nil? fail ArgumentError, "Missing the required parameter 'result_id' when calling SyntheticsAPI.get_api_test_result" end # resource path local_var_path = '/api/v1/synthetics/tests/{public_id}/results/{result_id}'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')).sub('{result_id}', CGI.escape(result_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] || 'SyntheticsAPITestResultFull' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_api_test_result, :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 => "V1" ) 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: SyntheticsAPI#get_api_test_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_api_test_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsAPITest, Integer, Hash)>
Get an API test.
Get the detailed configuration associated with a Synthetic API test.
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 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 579 def get_api_test_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_api_test ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_api_test" end # resource path local_var_path = '/api/v1/synthetics/tests/api/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsAPITest' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_api_test, :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 => "V1" ) 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: SyntheticsAPI#get_api_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_browser_test(public_id, opts = {}) ⇒ Object
Get a browser test.
773 774 775 776 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 773 def get_browser_test(public_id, opts = {}) data, _status_code, _headers = get_browser_test_with_http_info(public_id, opts) data end |
#get_browser_test_latest_results(public_id, opts = {}) ⇒ Object
Get a browser test’s latest results summaries.
839 840 841 842 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 839 def get_browser_test_latest_results(public_id, opts = {}) data, _status_code, _headers = get_browser_test_latest_results_with_http_info(public_id, opts) data end |
#get_browser_test_latest_results_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsGetBrowserTestLatestResultsResponse, Integer, Hash)>
Get a browser test’s latest results summaries.
Get the last 150 test results summaries for a given Synthetic browser test.
854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 854 def get_browser_test_latest_results_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_browser_test_latest_results ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_browser_test_latest_results" end # resource path local_var_path = '/api/v1/synthetics/tests/browser/{public_id}/results'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} query_params[:'from_ts'] = opts[:'from_ts'] if !opts[:'from_ts'].nil? query_params[:'to_ts'] = opts[:'to_ts'] if !opts[:'to_ts'].nil? query_params[:'probe_dc'] = @api_client.build_collection_param(opts[:'probe_dc'], :multi) if !opts[:'probe_dc'].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] || 'SyntheticsGetBrowserTestLatestResultsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_browser_test_latest_results, :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 => "V1" ) 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: SyntheticsAPI#get_browser_test_latest_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_browser_test_result(public_id, result_id, opts = {}) ⇒ Object
Get a browser test result.
910 911 912 913 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 910 def get_browser_test_result(public_id, result_id, opts = {}) data, _status_code, _headers = get_browser_test_result_with_http_info(public_id, result_id, opts) data end |
#get_browser_test_result_with_http_info(public_id, result_id, opts = {}) ⇒ Array<(SyntheticsBrowserTestResultFull, Integer, Hash)>
Get a browser test result.
Get a specific full result from a given Synthetic browser test.
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 923 def get_browser_test_result_with_http_info(public_id, result_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_browser_test_result ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_browser_test_result" end # verify the required parameter 'result_id' is set if @api_client.config.client_side_validation && result_id.nil? fail ArgumentError, "Missing the required parameter 'result_id' when calling SyntheticsAPI.get_browser_test_result" end # resource path local_var_path = '/api/v1/synthetics/tests/browser/{public_id}/results/{result_id}'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')).sub('{result_id}', CGI.escape(result_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] || 'SyntheticsBrowserTestResultFull' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_browser_test_result, :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 => "V1" ) 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: SyntheticsAPI#get_browser_test_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_browser_test_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsBrowserTest, Integer, Hash)>
Get a browser test.
Get the detailed configuration (including steps) associated with a Synthetic browser test.
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 786 def get_browser_test_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_browser_test ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_browser_test" end # resource path local_var_path = '/api/v1/synthetics/tests/browser/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsBrowserTest' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_browser_test, :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 => "V1" ) 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: SyntheticsAPI#get_browser_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_global_variable(variable_id, opts = {}) ⇒ Object
Get a global variable.
980 981 982 983 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 980 def get_global_variable(variable_id, opts = {}) data, _status_code, _headers = get_global_variable_with_http_info(variable_id, opts) data end |
#get_global_variable_with_http_info(variable_id, opts = {}) ⇒ Array<(SyntheticsGlobalVariable, Integer, Hash)>
Get a global variable.
Get the detailed configuration of a global variable.
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 992 def get_global_variable_with_http_info(variable_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_global_variable ...' end # verify the required parameter 'variable_id' is set if @api_client.config.client_side_validation && variable_id.nil? fail ArgumentError, "Missing the required parameter 'variable_id' when calling SyntheticsAPI.get_global_variable" end # resource path local_var_path = '/api/v1/synthetics/variables/{variable_id}'.sub('{variable_id}', CGI.escape(variable_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] || 'SyntheticsGlobalVariable' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_global_variable, :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 => "V1" ) 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: SyntheticsAPI#get_global_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_private_location(location_id, opts = {}) ⇒ Object
Get a private location.
1045 1046 1047 1048 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1045 def get_private_location(location_id, opts = {}) data, _status_code, _headers = get_private_location_with_http_info(location_id, opts) data end |
#get_private_location_with_http_info(location_id, opts = {}) ⇒ Array<(SyntheticsPrivateLocation, Integer, Hash)>
Get a private location.
Get a Synthetic private location.
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 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1057 def get_private_location_with_http_info(location_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_private_location ...' end # verify the required parameter 'location_id' is set if @api_client.config.client_side_validation && location_id.nil? fail ArgumentError, "Missing the required parameter 'location_id' when calling SyntheticsAPI.get_private_location" end # resource path local_var_path = '/api/v1/synthetics/private-locations/{location_id}'.sub('{location_id}', CGI.escape(location_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] || 'SyntheticsPrivateLocation' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_private_location, :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 => "V1" ) 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: SyntheticsAPI#get_private_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_synthetics_ci_batch(batch_id, opts = {}) ⇒ Object
Get details of batch.
1110 1111 1112 1113 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1110 def get_synthetics_ci_batch(batch_id, opts = {}) data, _status_code, _headers = get_synthetics_ci_batch_with_http_info(batch_id, opts) data end |
#get_synthetics_ci_batch_with_http_info(batch_id, opts = {}) ⇒ Array<(SyntheticsBatchDetails, Integer, Hash)>
Get details of batch.
Get a batch’s updated details.
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 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1122 def get_synthetics_ci_batch_with_http_info(batch_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_ci_batch ...' end # verify the required parameter 'batch_id' is set if @api_client.config.client_side_validation && batch_id.nil? fail ArgumentError, "Missing the required parameter 'batch_id' when calling SyntheticsAPI.get_synthetics_ci_batch" end # resource path local_var_path = '/api/v1/synthetics/ci/batch/{batch_id}'.sub('{batch_id}', CGI.escape(batch_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] || 'SyntheticsBatchDetails' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_synthetics_ci_batch, :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 => "V1" ) 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: SyntheticsAPI#get_synthetics_ci_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_synthetics_default_locations(opts = {}) ⇒ Object
Get the default locations.
1175 1176 1177 1178 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1175 def get_synthetics_default_locations(opts = {}) data, _status_code, _headers = get_synthetics_default_locations_with_http_info(opts) data end |
#get_synthetics_default_locations_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
Get the default locations.
Get the default locations settings.
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/v1/api/synthetics_api.rb', line 1186 def get_synthetics_default_locations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_default_locations ...' end # resource path local_var_path = '/api/v1/synthetics/settings/default_locations' # 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] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] = opts.merge( :operation => :get_synthetics_default_locations, :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 => "V1" ) 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: SyntheticsAPI#get_synthetics_default_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_test(public_id, opts = {}) ⇒ Object
Get a test configuration.
1235 1236 1237 1238 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1235 def get_test(public_id, opts = {}) data, _status_code, _headers = get_test_with_http_info(public_id, opts) data end |
#get_test_with_http_info(public_id, opts = {}) ⇒ Array<(SyntheticsTestDetails, Integer, Hash)>
Get a test configuration.
Get the detailed configuration associated with a Synthetic test.
1247 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 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1247 def get_test_with_http_info(public_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_test ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_test" end # resource path local_var_path = '/api/v1/synthetics/tests/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsTestDetails' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :get_test, :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 => "V1" ) 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: SyntheticsAPI#get_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_global_variables(opts = {}) ⇒ Object
Get all global variables.
1300 1301 1302 1303 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1300 def list_global_variables(opts = {}) data, _status_code, _headers = list_global_variables_with_http_info(opts) data end |
#list_global_variables_with_http_info(opts = {}) ⇒ Array<(SyntheticsListGlobalVariablesResponse, Integer, Hash)>
Get all global variables.
Get the list of all Synthetic global variables.
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1311 def list_global_variables_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.list_global_variables ...' end # resource path local_var_path = '/api/v1/synthetics/variables' # 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] || 'SyntheticsListGlobalVariablesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_global_variables, :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 => "V1" ) 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: SyntheticsAPI#list_global_variables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_locations(opts = {}) ⇒ Object
Get all locations (public and private).
1360 1361 1362 1363 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1360 def list_locations(opts = {}) data, _status_code, _headers = list_locations_with_http_info(opts) data end |
#list_locations_with_http_info(opts = {}) ⇒ Array<(SyntheticsLocations, Integer, Hash)>
Get all locations (public and private).
Get the list of public and private locations available for Synthetic tests. No arguments required.
1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1372 def list_locations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.list_locations ...' end # resource path local_var_path = '/api/v1/synthetics/locations' # 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] || 'SyntheticsLocations' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_locations, :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 => "V1" ) 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: SyntheticsAPI#list_locations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_tests(opts = {}) ⇒ Object
Get the list of all Synthetic tests.
1421 1422 1423 1424 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1421 def list_tests(opts = {}) data, _status_code, _headers = list_tests_with_http_info(opts) data end |
#list_tests_with_http_info(opts = {}) ⇒ Array<(SyntheticsListTestsResponse, Integer, Hash)>
Get the list of all Synthetic tests.
Get the list of all Synthetic tests.
1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1434 def list_tests_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.list_tests ...' end # resource path local_var_path = '/api/v1/synthetics/tests' # 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? # 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] || 'SyntheticsListTestsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :list_tests, :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 => "V1" ) 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: SyntheticsAPI#list_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_tests_with_pagination(opts = {}) {|SyntheticsTestDetails| ... } ⇒ Object
Get the list of all Synthetic tests.
Provide a paginated version of #list_tests, returning all items.
To use it you need to use a block: list_tests_with_pagination { |item| p item }
1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1489 def list_tests_with_pagination(opts = {}) api_version = "V1" page_size = @api_client.get_attribute_from_path(opts, "page_size", 100) @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 = list_tests(opts) @api_client.get_attribute_from_path(response, "tests").each { |item| yield(item) } if @api_client.get_attribute_from_path(response, "tests").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 |
#patch_test(public_id, body, opts = {}) ⇒ Object
Patch a Synthetic test.
1507 1508 1509 1510 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1507 def patch_test(public_id, body, opts = {}) data, _status_code, _headers = patch_test_with_http_info(public_id, body, opts) data end |
#patch_test_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsTestDetails, Integer, Hash)>
Patch a Synthetic test.
Patch the configuration of a Synthetic test with partial data.
1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1520 def patch_test_with_http_info(public_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.patch_test ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.patch_test" 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 SyntheticsAPI.patch_test" end # resource path local_var_path = '/api/v1/synthetics/tests/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsTestDetails' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :patch_test, :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 => "V1" ) 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: SyntheticsAPI#patch_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#trigger_ci_tests(body, opts = {}) ⇒ Object
Trigger tests from CI/CD pipelines.
1579 1580 1581 1582 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1579 def trigger_ci_tests(body, opts = {}) data, _status_code, _headers = trigger_ci_tests_with_http_info(body, opts) data end |
#trigger_ci_tests_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsTriggerCITestsResponse, Integer, Hash)>
Trigger tests from CI/CD pipelines.
Trigger a set of Synthetic tests for continuous integration.
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1591 def trigger_ci_tests_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.trigger_ci_tests ...' 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 SyntheticsAPI.trigger_ci_tests" end # resource path local_var_path = '/api/v1/synthetics/tests/trigger/ci' # 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] || 'SyntheticsTriggerCITestsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :trigger_ci_tests, :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 => "V1" ) 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: SyntheticsAPI#trigger_ci_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#trigger_tests(body, opts = {}) ⇒ Object
Trigger Synthetic tests.
1646 1647 1648 1649 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1646 def trigger_tests(body, opts = {}) data, _status_code, _headers = trigger_tests_with_http_info(body, opts) data end |
#trigger_tests_with_http_info(body, opts = {}) ⇒ Array<(SyntheticsTriggerCITestsResponse, Integer, Hash)>
Trigger Synthetic tests.
Trigger a set of Synthetic tests.
1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1658 def trigger_tests_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.trigger_tests ...' 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 SyntheticsAPI.trigger_tests" end # resource path local_var_path = '/api/v1/synthetics/tests/trigger' # 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] || 'SyntheticsTriggerCITestsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :trigger_tests, :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 => "V1" ) 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: SyntheticsAPI#trigger_tests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_api_test(public_id, body, opts = {}) ⇒ Object
Edit an API test.
1713 1714 1715 1716 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1713 def update_api_test(public_id, body, opts = {}) data, _status_code, _headers = update_api_test_with_http_info(public_id, body, opts) data end |
#update_api_test_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsAPITest, Integer, Hash)>
Edit an API test.
Edit the configuration of a Synthetic API test.
1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1726 def update_api_test_with_http_info(public_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.update_api_test ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.update_api_test" 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 SyntheticsAPI.update_api_test" end # resource path local_var_path = '/api/v1/synthetics/tests/api/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsAPITest' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_api_test, :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 => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SyntheticsAPI#update_api_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_browser_test(public_id, body, opts = {}) ⇒ Object
Edit a browser test.
1785 1786 1787 1788 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1785 def update_browser_test(public_id, body, opts = {}) data, _status_code, _headers = update_browser_test_with_http_info(public_id, body, opts) data end |
#update_browser_test_with_http_info(public_id, body, opts = {}) ⇒ Array<(SyntheticsBrowserTest, Integer, Hash)>
Edit a browser test.
Edit the configuration of a Synthetic browser test.
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1798 def update_browser_test_with_http_info(public_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.update_browser_test ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.update_browser_test" 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 SyntheticsAPI.update_browser_test" end # resource path local_var_path = '/api/v1/synthetics/tests/browser/{public_id}'.sub('{public_id}', CGI.escape(public_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] || 'SyntheticsBrowserTest' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_browser_test, :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 => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SyntheticsAPI#update_browser_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_private_location(location_id, body, opts = {}) ⇒ Object
Edit a private location.
1857 1858 1859 1860 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1857 def update_private_location(location_id, body, opts = {}) data, _status_code, _headers = update_private_location_with_http_info(location_id, body, opts) data end |
#update_private_location_with_http_info(location_id, body, opts = {}) ⇒ Array<(SyntheticsPrivateLocation, Integer, Hash)>
Edit a private location.
Edit a Synthetic private location.
1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1870 def update_private_location_with_http_info(location_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.update_private_location ...' end # verify the required parameter 'location_id' is set if @api_client.config.client_side_validation && location_id.nil? fail ArgumentError, "Missing the required parameter 'location_id' when calling SyntheticsAPI.update_private_location" 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 SyntheticsAPI.update_private_location" end # resource path local_var_path = '/api/v1/synthetics/private-locations/{location_id}'.sub('{location_id}', CGI.escape(location_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] || 'SyntheticsPrivateLocation' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_private_location, :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 => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SyntheticsAPI#update_private_location\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_test_pause_status(public_id, body, opts = {}) ⇒ Object
Pause or start a test.
1929 1930 1931 1932 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1929 def update_test_pause_status(public_id, body, opts = {}) data, _status_code, _headers = update_test_pause_status_with_http_info(public_id, body, opts) data end |
#update_test_pause_status_with_http_info(public_id, body, opts = {}) ⇒ Array<(Boolean, Integer, Hash)>
Pause or start a test.
Pause or start a Synthetic test by changing the status.
1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 |
# File 'lib/datadog_api_client/v1/api/synthetics_api.rb', line 1942 def update_test_pause_status_with_http_info(public_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SyntheticsAPI.update_test_pause_status ...' end # verify the required parameter 'public_id' is set if @api_client.config.client_side_validation && public_id.nil? fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.update_test_pause_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 SyntheticsAPI.update_test_pause_status" end # resource path local_var_path = '/api/v1/synthetics/tests/{public_id}/status'.sub('{public_id}', CGI.escape(public_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] || 'Boolean' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] = opts.merge( :operation => :update_test_pause_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 => "V1" ) data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: SyntheticsAPI#update_test_pause_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |