class DatadogAPIClient::V1::SyntheticsAPI
Attributes
Public Class Methods
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 22 def initialize(api_client = APIClient.default) @api_client = api_client end
Public Instance Methods
Create a global variable Create a Synthetics global variable. @param body [SyntheticsGlobalVariable] Details of the global variable to create. @param [Hash] opts the optional parameters @return [SyntheticsGlobalVariable]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 30 def create_global_variable(body, opts = {}) data, _status_code, _headers = create_global_variable_with_http_info(body, opts) data end
Create a global variable Create a Synthetics global variable. @param body [SyntheticsGlobalVariable] Details of the global variable to create. @param [Hash] opts the optional parameters @return [Array<(SyntheticsGlobalVariable
, Integer, Hash)>] SyntheticsGlobalVariable
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 40 def create_global_variable_with_http_info(body, opts = {}) if @api_client.config.unstable_operations.has_key?(:create_global_variable) unstable_enabled = @api_client.config.unstable_operations[:create_global_variable] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "create_global_variable") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_global_variable")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) 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 a private location Create a new Synthetics private location. @param body [SyntheticsPrivateLocation] Details of the private location to create. @param [Hash] opts the optional parameters @return [SyntheticsPrivateLocationCreationResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 105 def create_private_location(body, opts = {}) data, _status_code, _headers = create_private_location_with_http_info(body, opts) data end
Create a private location Create a new Synthetics private location. @param body [SyntheticsPrivateLocation] Details of the private location to create. @param [Hash] opts the optional parameters @return [Array<(SyntheticsPrivateLocationCreationResponse
, Integer, Hash)>] SyntheticsPrivateLocationCreationResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 115 def create_private_location_with_http_info(body, opts = {}) if @api_client.config.unstable_operations.has_key?(:create_private_location) unstable_enabled = @api_client.config.unstable_operations[:create_private_location] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "create_private_location") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_private_location")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) 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 an API test Create a Synthetic API test. @param body [SyntheticsAPITest] Details of the test to create. @param [Hash] opts the optional parameters @return [SyntheticsAPITest]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 180 def create_synthetics_api_test(body, opts = {}) data, _status_code, _headers = create_synthetics_api_test_with_http_info(body, opts) data end
Create an API test Create a Synthetic API test. @param body [SyntheticsAPITest] Details of the test to create. @param [Hash] opts the optional parameters @return [Array<(SyntheticsAPITest
, Integer, Hash)>] SyntheticsAPITest
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 190 def create_synthetics_api_test_with_http_info(body, opts = {}) if @api_client.config.unstable_operations.has_key?(:create_synthetics_api_test) unstable_enabled = @api_client.config.unstable_operations[:create_synthetics_api_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "create_synthetics_api_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_synthetics_api_test")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) 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 a browser test Create a Synthetic browser test. @param body [SyntheticsBrowserTest] Details of the test to create. @param [Hash] opts the optional parameters @return [SyntheticsBrowserTest]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 255 def create_synthetics_browser_test(body, opts = {}) data, _status_code, _headers = create_synthetics_browser_test_with_http_info(body, opts) data end
Create a browser test Create a Synthetic browser test. @param body [SyntheticsBrowserTest] Details of the test to create. @param [Hash] opts the optional parameters @return [Array<(SyntheticsBrowserTest
, Integer, Hash)>] SyntheticsBrowserTest
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 265 def create_synthetics_browser_test_with_http_info(body, opts = {}) if @api_client.config.unstable_operations.has_key?(:create_synthetics_browser_test) unstable_enabled = @api_client.config.unstable_operations[:create_synthetics_browser_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "create_synthetics_browser_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_synthetics_browser_test")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) 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 a global variable Delete a Synthetics global variable. @param variable_id [String] The ID of the global variable. @param [Hash] opts the optional parameters @return [nil]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 330 def delete_global_variable(variable_id, opts = {}) delete_global_variable_with_http_info(variable_id, opts) nil end
Delete a global variable Delete a Synthetics global variable. @param variable_id [String] The ID of the global variable. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 340 def delete_global_variable_with_http_info(variable_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:delete_global_variable) unstable_enabled = @api_client.config.unstable_operations[:delete_global_variable] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_global_variable") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_global_variable")) end end 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)) # 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] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = 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 ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) 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 a private location Delete a Synthetics private location. @param location_id [String] The ID of the private location. @param [Hash] opts the optional parameters @return [nil]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 403 def delete_private_location(location_id, opts = {}) delete_private_location_with_http_info(location_id, opts) nil end
Delete a private location Delete a Synthetics private location. @param location_id [String] The ID of the private location. @param [Hash] opts the optional parameters @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 413 def delete_private_location_with_http_info(location_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:delete_private_location) unstable_enabled = @api_client.config.unstable_operations[:delete_private_location] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_private_location") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_private_location")) end end 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)) # 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] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = 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 ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) 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 Delete multiple Synthetic tests by ID. @param body [SyntheticsDeleteTestsPayload] Public ID list of the Synthetic tests to be deleted. @param [Hash] opts the optional parameters @return [SyntheticsDeleteTestsResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 476 def delete_tests(body, opts = {}) data, _status_code, _headers = delete_tests_with_http_info(body, opts) data end
Delete tests Delete multiple Synthetic tests by ID. @param body [SyntheticsDeleteTestsPayload] Public ID list of the Synthetic tests to be deleted. @param [Hash] opts the optional parameters @return [Array<(SyntheticsDeleteTestsResponse
, Integer, Hash)>] SyntheticsDeleteTestsResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 486 def delete_tests_with_http_info(body, opts = {}) if @api_client.config.unstable_operations.has_key?(:delete_tests) unstable_enabled = @api_client.config.unstable_operations[:delete_tests] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_tests") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_tests")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) 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 a global variable Edit a Synthetics global variable. @param variable_id [String] The ID of the global variable. @param body [SyntheticsGlobalVariable] Details of the global variable to update. @param [Hash] opts the optional parameters @return [SyntheticsGlobalVariable]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 552 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 a global variable Edit a Synthetics global variable. @param variable_id [String] The ID of the global variable. @param body [SyntheticsGlobalVariable] Details of the global variable to update. @param [Hash] opts the optional parameters @return [Array<(SyntheticsGlobalVariable
, Integer, Hash)>] SyntheticsGlobalVariable
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 563 def edit_global_variable_with_http_info(variable_id, body, opts = {}) if @api_client.config.unstable_operations.has_key?(:edit_global_variable) unstable_enabled = @api_client.config.unstable_operations[:edit_global_variable] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "edit_global_variable") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "edit_global_variable")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) 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 an API test Get the detailed configuration associated with a Synthetic API test. @param public_id [String] The public ID of the test to get details from. @param [Hash] opts the optional parameters @return [SyntheticsAPITest]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 632 def get_api_test(public_id, opts = {}) data, _status_code, _headers = get_api_test_with_http_info(public_id, opts) data end
Get an API test's latest results summaries Get the last 50 test results summaries for a given Synthetics API test. @param public_id [String] The public ID of the test for which to search results for. @param [Hash] opts the optional parameters @option opts [Integer] :from_ts Timestamp from which to start querying results. @option opts [Integer] :to_ts Timestamp up to which to query results. @option opts [Array<String>] :probe_dc Locations for which to query results. @return [SyntheticsGetAPITestLatestResultsResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 708 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 an API test's latest results summaries Get the last 50 test results summaries for a given Synthetics API test. @param public_id [String] The public ID of the test for which to search results for. @param [Hash] opts the optional parameters @option opts [Integer] :from_ts Timestamp from which to start querying results. @option opts [Integer] :to_ts Timestamp up to which to query results. @option opts [Array<String>] :probe_dc Locations for which to query results. @return [Array<(SyntheticsGetAPITestLatestResultsResponse
, Integer, Hash)>] SyntheticsGetAPITestLatestResultsResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 721 def get_api_test_latest_results_with_http_info(public_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_api_test_latest_results) unstable_enabled = @api_client.config.unstable_operations[:get_api_test_latest_results] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_api_test_latest_results") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_api_test_latest_results")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 an API test result Get a specific full result from a given (API) Synthetic test. @param public_id [String] The public ID of the API test to which the target result belongs. @param result_id [String] The ID of the result to get. @param [Hash] opts the optional parameters @return [SyntheticsAPITestResultFull]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 788 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 an API test result Get a specific full result from a given (API) Synthetic test. @param public_id [String] The public ID of the API test to which the target result belongs. @param result_id [String] The ID of the result to get. @param [Hash] opts the optional parameters @return [Array<(SyntheticsAPITestResultFull
, Integer, Hash)>] SyntheticsAPITestResultFull
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 799 def get_api_test_result_with_http_info(public_id, result_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_api_test_result) unstable_enabled = @api_client.config.unstable_operations[:get_api_test_result] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_api_test_result") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_api_test_result")) end end 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)).sub('{' + 'result_id' + '}', CGI.escape(result_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 an API test Get the detailed configuration associated with a Synthetic API test. @param public_id [String] The public ID of the test to get details from. @param [Hash] opts the optional parameters @return [Array<(SyntheticsAPITest
, Integer, Hash)>] SyntheticsAPITest
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 642 def get_api_test_with_http_info(public_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_api_test) unstable_enabled = @api_client.config.unstable_operations[:get_api_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_api_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_api_test")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 a browser test Get the detailed configuration (including steps) associated with a Synthetic browser test. @param public_id [String] The public ID of the test to get details from. @param [Hash] opts the optional parameters @return [SyntheticsBrowserTest]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 866 def get_browser_test(public_id, opts = {}) data, _status_code, _headers = get_browser_test_with_http_info(public_id, opts) data end
Get a browser test's latest results summaries Get the last 50 test results summaries for a given Synthetics Browser test. @param public_id [String] The public ID of the browser test for which to search results for. @param [Hash] opts the optional parameters @option opts [Integer] :from_ts Timestamp from which to start querying results. @option opts [Integer] :to_ts Timestamp up to which to query results. @option opts [Array<String>] :probe_dc Locations for which to query results. @return [SyntheticsGetBrowserTestLatestResultsResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 942 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 a browser test's latest results summaries Get the last 50 test results summaries for a given Synthetics Browser test. @param public_id [String] The public ID of the browser test for which to search results for. @param [Hash] opts the optional parameters @option opts [Integer] :from_ts Timestamp from which to start querying results. @option opts [Integer] :to_ts Timestamp up to which to query results. @option opts [Array<String>] :probe_dc Locations for which to query results. @return [Array<(SyntheticsGetBrowserTestLatestResultsResponse
, Integer, Hash)>] SyntheticsGetBrowserTestLatestResultsResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 955 def get_browser_test_latest_results_with_http_info(public_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_browser_test_latest_results) unstable_enabled = @api_client.config.unstable_operations[:get_browser_test_latest_results] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_browser_test_latest_results") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_browser_test_latest_results")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 a browser test result Get a specific full result from a given (browser) Synthetic test. @param public_id [String] The public ID of the browser test to which the target result belongs. @param result_id [String] The ID of the result to get. @param [Hash] opts the optional parameters @return [SyntheticsBrowserTestResultFull]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1022 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 a browser test result Get a specific full result from a given (browser) Synthetic test. @param public_id [String] The public ID of the browser test to which the target result belongs. @param result_id [String] The ID of the result to get. @param [Hash] opts the optional parameters @return [Array<(SyntheticsBrowserTestResultFull
, Integer, Hash)>] SyntheticsBrowserTestResultFull
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1033 def get_browser_test_result_with_http_info(public_id, result_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_browser_test_result) unstable_enabled = @api_client.config.unstable_operations[:get_browser_test_result] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_browser_test_result") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_browser_test_result")) end end 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)).sub('{' + 'result_id' + '}', CGI.escape(result_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 a browser test Get the detailed configuration (including steps) associated with a Synthetic browser test. @param public_id [String] The public ID of the test to get details from. @param [Hash] opts the optional parameters @return [Array<(SyntheticsBrowserTest
, Integer, Hash)>] SyntheticsBrowserTest
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 876 def get_browser_test_with_http_info(public_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_browser_test) unstable_enabled = @api_client.config.unstable_operations[:get_browser_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_browser_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_browser_test")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 a global variable Get the detailed configuration of a global variable. @param variable_id [String] The ID of the global variable. @param [Hash] opts the optional parameters @return [SyntheticsGlobalVariable]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1100 def get_global_variable(variable_id, opts = {}) data, _status_code, _headers = get_global_variable_with_http_info(variable_id, opts) data end
Get a global variable Get the detailed configuration of a global variable. @param variable_id [String] The ID of the global variable. @param [Hash] opts the optional parameters @return [Array<(SyntheticsGlobalVariable
, Integer, Hash)>] SyntheticsGlobalVariable
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1110 def get_global_variable_with_http_info(variable_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_global_variable) unstable_enabled = @api_client.config.unstable_operations[:get_global_variable] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_global_variable") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_global_variable")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 a private location Get a Synthetics private location. @param location_id [String] The ID of the private location. @param [Hash] opts the optional parameters @return [SyntheticsPrivateLocation]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1173 def get_private_location(location_id, opts = {}) data, _status_code, _headers = get_private_location_with_http_info(location_id, opts) data end
Get a private location Get a Synthetics private location. @param location_id [String] The ID of the private location. @param [Hash] opts the optional parameters @return [Array<(SyntheticsPrivateLocation
, Integer, Hash)>] SyntheticsPrivateLocation
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1183 def get_private_location_with_http_info(location_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_private_location) unstable_enabled = @api_client.config.unstable_operations[:get_private_location] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_private_location") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_private_location")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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 a test configuration Get the detailed configuration associated with a Synthetics test. @param public_id [String] The public ID of the test to get details from. @param [Hash] opts the optional parameters @return [SyntheticsTestDetails]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1246 def get_test(public_id, opts = {}) data, _status_code, _headers = get_test_with_http_info(public_id, opts) data end
Get a test configuration Get the detailed configuration associated with a Synthetics test. @param public_id [String] The public ID of the test to get details from. @param [Hash] opts the optional parameters @return [Array<(SyntheticsTestDetails
, Integer, Hash)>] SyntheticsTestDetails
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1256 def get_test_with_http_info(public_id, opts = {}) if @api_client.config.unstable_operations.has_key?(:get_test) unstable_enabled = @api_client.config.unstable_operations[:get_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "get_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_test")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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
Get all global variables Get the list of all Synthetics global variables. @param [Hash] opts the optional parameters @return [SyntheticsListGlobalVariablesResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1318 def list_global_variables(opts = {}) data, _status_code, _headers = list_global_variables_with_http_info(opts) data end
Get all global variables Get the list of all Synthetics global variables. @param [Hash] opts the optional parameters @return [Array<(SyntheticsListGlobalVariablesResponse
, Integer, Hash)>] SyntheticsListGlobalVariablesResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1327 def list_global_variables_with_http_info(opts = {}) if @api_client.config.unstable_operations.has_key?(:list_global_variables) unstable_enabled = @api_client.config.unstable_operations[:list_global_variables] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "list_global_variables") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_global_variables")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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
Get all locations (public and private) Get the list of public and private locations available for Synthetic tests. No arguments required. @param [Hash] opts the optional parameters @return [SyntheticsLocations]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1385 def list_locations(opts = {}) data, _status_code, _headers = list_locations_with_http_info(opts) data end
Get all locations (public and private) Get the list of public and private locations available for Synthetic tests. No arguments required. @param [Hash] opts the optional parameters @return [Array<(SyntheticsLocations
, Integer, Hash)>] SyntheticsLocations
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1394 def list_locations_with_http_info(opts = {}) if @api_client.config.unstable_operations.has_key?(:list_locations) unstable_enabled = @api_client.config.unstable_operations[:list_locations] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "list_locations") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_locations")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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
Get the list of all tests Get the list of all Synthetic tests. @param [Hash] opts the optional parameters @return [SyntheticsListTestsResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1452 def list_tests(opts = {}) data, _status_code, _headers = list_tests_with_http_info(opts) data end
Get the list of all tests Get the list of all Synthetic tests. @param [Hash] opts the optional parameters @return [Array<(SyntheticsListTestsResponse
, Integer, Hash)>] SyntheticsListTestsResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1461 def list_tests_with_http_info(opts = {}) if @api_client.config.unstable_operations.has_key?(:list_tests) unstable_enabled = @api_client.config.unstable_operations[:list_tests] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "list_tests") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_tests")) end end 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] || {} # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) 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
Trigger tests from CI/CD pipelines Trigger a set of Synthetics tests for continuous integration. @param body [SyntheticsCITestBody] Details of the test to trigger. @param [Hash] opts the optional parameters @return [SyntheticsTriggerCITestsResponse]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1520 def trigger_ci_tests(body, opts = {}) data, _status_code, _headers = trigger_ci_tests_with_http_info(body, opts) data end
Trigger tests from CI/CD pipelines Trigger a set of Synthetics tests for continuous integration. @param body [SyntheticsCITestBody] Details of the test to trigger. @param [Hash] opts the optional parameters @return [Array<(SyntheticsTriggerCITestsResponse
, Integer, Hash)>] SyntheticsTriggerCITestsResponse
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1530 def trigger_ci_tests_with_http_info(body, opts = {}) if @api_client.config.unstable_operations.has_key?(:trigger_ci_tests) unstable_enabled = @api_client.config.unstable_operations[:trigger_ci_tests] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "trigger_ci_tests") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "trigger_ci_tests")) end end 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) 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
Edit an API test Edit the configuration of a Synthetic API test. @param public_id [String] The public ID of the test to get details from. @param body [SyntheticsAPITest] New test details to be saved. @param [Hash] opts the optional parameters @return [SyntheticsAPITest]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1596 def update_api_test(public_id, body, opts = {}) data, _status_code, _headers = update_api_test_with_http_info(public_id, body, opts) data end
Edit an API test Edit the configuration of a Synthetic API test. @param public_id [String] The public ID of the test to get details from. @param body [SyntheticsAPITest] New test details to be saved. @param [Hash] opts the optional parameters @return [Array<(SyntheticsAPITest
, Integer, Hash)>] SyntheticsAPITest
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1607 def update_api_test_with_http_info(public_id, body, opts = {}) if @api_client.config.unstable_operations.has_key?(:update_api_test) unstable_enabled = @api_client.config.unstable_operations[:update_api_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "update_api_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_api_test")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) 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
Edit a browser test Edit the configuration of a Synthetic browser test. @param public_id [String] The public ID of the test to get details from. @param body [SyntheticsBrowserTest] New test details to be saved. @param [Hash] opts the optional parameters @return [SyntheticsBrowserTest]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1677 def update_browser_test(public_id, body, opts = {}) data, _status_code, _headers = update_browser_test_with_http_info(public_id, body, opts) data end
Edit a browser test Edit the configuration of a Synthetic browser test. @param public_id [String] The public ID of the test to get details from. @param body [SyntheticsBrowserTest] New test details to be saved. @param [Hash] opts the optional parameters @return [Array<(SyntheticsBrowserTest
, Integer, Hash)>] SyntheticsBrowserTest
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1688 def update_browser_test_with_http_info(public_id, body, opts = {}) if @api_client.config.unstable_operations.has_key?(:update_browser_test) unstable_enabled = @api_client.config.unstable_operations[:update_browser_test] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "update_browser_test") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_browser_test")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) 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
Edit a private location Edit a Synthetics private location. @param location_id [String] The ID of the private location. @param body [SyntheticsPrivateLocation] Details of the private location to be updated. @param [Hash] opts the optional parameters @return [SyntheticsPrivateLocation]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1758 def update_private_location(location_id, body, opts = {}) data, _status_code, _headers = update_private_location_with_http_info(location_id, body, opts) data end
Edit a private location Edit a Synthetics private location. @param location_id [String] The ID of the private location. @param body [SyntheticsPrivateLocation] Details of the private location to be updated. @param [Hash] opts the optional parameters @return [Array<(SyntheticsPrivateLocation
, Integer, Hash)>] SyntheticsPrivateLocation
data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1769 def update_private_location_with_http_info(location_id, body, opts = {}) if @api_client.config.unstable_operations.has_key?(:update_private_location) unstable_enabled = @api_client.config.unstable_operations[:update_private_location] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "update_private_location") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_private_location")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) 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
Pause or start a test Pause or start a Synthetics test by changing the status. @param public_id [String] The public ID of the Synthetic test to update. @param body [SyntheticsUpdateTestPauseStatusPayload] Status to set the given Synthetic test to. @param [Hash] opts the optional parameters @return [Boolean]
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1839 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
Pause or start a test Pause or start a Synthetics test by changing the status. @param public_id [String] The public ID of the Synthetic test to update. @param body [SyntheticsUpdateTestPauseStatusPayload] Status to set the given Synthetic test to. @param [Hash] opts the optional parameters @return [Array<(Boolean, Integer, Hash)>] Boolean data, response status code and response headers
# File lib/datadog_api_client/v1/api/synthetics_api.rb, line 1850 def update_test_pause_status_with_http_info(public_id, body, opts = {}) if @api_client.config.unstable_operations.has_key?(:update_test_pause_status) unstable_enabled = @api_client.config.unstable_operations[:update_test_pause_status] if unstable_enabled @api_client.config.logger.warn format("Using unstable operation '%s'", "update_test_pause_status") else raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_test_pause_status")) end end 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)) # 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] new_options = 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 ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) 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