lib/purecloud/api/alerting_api.rb in purecloud-0.50.1 vs lib/purecloud/api/alerting_api.rb in purecloud-0.51.1
- old
+ new
@@ -22,10 +22,128 @@
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
+ # Delete a heart beat alert
+ #
+ # @param alert_id Alert ID
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_heartbeat_alerts_alert_id(alert_id, opts = {})
+ delete_heartbeat_alerts_alert_id_with_http_info(alert_id, opts)
+ return nil
+ end
+
+ # Delete a heart beat alert
+ #
+ # @param alert_id Alert ID
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
+ def delete_heartbeat_alerts_alert_id_with_http_info(alert_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#delete_heartbeat_alerts_alert_id ..."
+ end
+
+ # verify the required parameter 'alert_id' is set
+ fail "Missing the required parameter 'alert_id' when calling delete_heartbeat_alerts_alert_id" if alert_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#delete_heartbeat_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete a heart beat rule.
+ #
+ # @param rule_id Rule ID
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_heartbeat_rules_rule_id(rule_id, opts = {})
+ delete_heartbeat_rules_rule_id_with_http_info(rule_id, opts)
+ return nil
+ end
+
+ # Delete a heart beat rule.
+ #
+ # @param rule_id Rule ID
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
+ def delete_heartbeat_rules_rule_id_with_http_info(rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#delete_heartbeat_rules_rule_id ..."
+ end
+
+ # verify the required parameter 'rule_id' is set
+ fail "Missing the required parameter 'rule_id' when calling delete_heartbeat_rules_rule_id" if rule_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#delete_heartbeat_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
# Delete an interaction stats alert
#
# @param alert_id Alert ID
# @param [Hash] opts the optional parameters
# @return [nil]
@@ -140,10 +258,240 @@
@api_client.config.logger.debug "API called: AlertingApi#delete_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Get heart beat alert list.
+ #
+ # @param [Hash] opts the optional parameters
+ # @return [HeartBeatAlertContainer]
+ def get_heartbeat_alerts(opts = {})
+ data, status_code, headers = get_heartbeat_alerts_with_http_info(opts)
+ return data
+ end
+
+ # Get heart beat alert list.
+ #
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(HeartBeatAlertContainer, Fixnum, Hash)>] HeartBeatAlertContainer data, response status code and response headers
+ def get_heartbeat_alerts_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_heartbeat_alerts ..."
+ end
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/alerts".sub('{format}','json')
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'HeartBeatAlertContainer')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#get_heartbeat_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get a heart beat alert
+ #
+ # @param alert_id Alert ID
+ # @param [Hash] opts the optional parameters
+ # @return [HeartBeatAlert]
+ def get_heartbeat_alerts_alert_id(alert_id, opts = {})
+ data, status_code, headers = get_heartbeat_alerts_alert_id_with_http_info(alert_id, opts)
+ return data
+ end
+
+ # Get a heart beat alert
+ #
+ # @param alert_id Alert ID
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(HeartBeatAlert, Fixnum, Hash)>] HeartBeatAlert data, response status code and response headers
+ def get_heartbeat_alerts_alert_id_with_http_info(alert_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_heartbeat_alerts_alert_id ..."
+ end
+
+ # verify the required parameter 'alert_id' is set
+ fail "Missing the required parameter 'alert_id' when calling get_heartbeat_alerts_alert_id" if alert_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'HeartBeatAlert')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#get_heartbeat_alerts_alert_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get a heart beat rule list.
+ #
+ # @param [Hash] opts the optional parameters
+ # @return [HeartBeatRuleContainer]
+ def get_heartbeat_rules(opts = {})
+ data, status_code, headers = get_heartbeat_rules_with_http_info(opts)
+ return data
+ end
+
+ # Get a heart beat rule list.
+ #
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(HeartBeatRuleContainer, Fixnum, Hash)>] HeartBeatRuleContainer data, response status code and response headers
+ def get_heartbeat_rules_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_heartbeat_rules ..."
+ end
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/rules".sub('{format}','json')
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'HeartBeatRuleContainer')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#get_heartbeat_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get a heart beat rule.
+ #
+ # @param rule_id Rule ID
+ # @param [Hash] opts the optional parameters
+ # @return [HeartBeatRule]
+ def get_heartbeat_rules_rule_id(rule_id, opts = {})
+ data, status_code, headers = get_heartbeat_rules_rule_id_with_http_info(rule_id, opts)
+ return data
+ end
+
+ # Get a heart beat rule.
+ #
+ # @param rule_id Rule ID
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(HeartBeatRule, Fixnum, Hash)>] HeartBeatRule data, response status code and response headers
+ def get_heartbeat_rules_rule_id_with_http_info(rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#get_heartbeat_rules_rule_id ..."
+ end
+
+ # verify the required parameter 'rule_id' is set
+ fail "Missing the required parameter 'rule_id' when calling get_heartbeat_rules_rule_id" if rule_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = nil
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'HeartBeatRule')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#get_heartbeat_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
# Get interaction stats alert list.
#
# @param [Hash] opts the optional parameters
# @return [InteractionStatsAlertContainer]
def get_interactionstats_alerts(opts = {})
@@ -425,10 +773,70 @@
@api_client.config.logger.debug "API called: AlertingApi#get_interactionstats_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Create a heart beat rule.
+ #
+ # @param body HeartBeatRule
+ # @param [Hash] opts the optional parameters
+ # @return [HeartBeatRule]
+ def post_heartbeat_rules(body, opts = {})
+ data, status_code, headers = post_heartbeat_rules_with_http_info(body, opts)
+ return data
+ end
+
+ # Create a heart beat rule.
+ #
+ # @param body HeartBeatRule
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(HeartBeatRule, Fixnum, Hash)>] HeartBeatRule data, response status code and response headers
+ def post_heartbeat_rules_with_http_info(body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#post_heartbeat_rules ..."
+ end
+
+ # verify the required parameter 'body' is set
+ fail "Missing the required parameter 'body' when calling post_heartbeat_rules" if body.nil?
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/rules".sub('{format}','json')
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = @api_client.object_to_http_body(body)
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'HeartBeatRule')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#post_heartbeat_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
# Create an interaction stats rule.
#
# @param body AlertingRule
# @param [Hash] opts the optional parameters
# @return [InteractionStatsRule]
@@ -481,9 +889,74 @@
:body => post_body,
:auth_names => auth_names,
:return_type => 'InteractionStatsRule')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: AlertingApi#post_interactionstats_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update a heart beat rule
+ #
+ # @param rule_id Rule ID
+ # @param body HeartBeatRule
+ # @param [Hash] opts the optional parameters
+ # @return [HeartBeatRule]
+ def put_heartbeat_rules_rule_id(rule_id, body, opts = {})
+ data, status_code, headers = put_heartbeat_rules_rule_id_with_http_info(rule_id, body, opts)
+ return data
+ end
+
+ # Update a heart beat rule
+ #
+ # @param rule_id Rule ID
+ # @param body HeartBeatRule
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(HeartBeatRule, Fixnum, Hash)>] HeartBeatRule data, response status code and response headers
+ def put_heartbeat_rules_rule_id_with_http_info(rule_id, body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: AlertingApi#put_heartbeat_rules_rule_id ..."
+ end
+
+ # verify the required parameter 'rule_id' is set
+ fail "Missing the required parameter 'rule_id' when calling put_heartbeat_rules_rule_id" if rule_id.nil?
+
+ # verify the required parameter 'body' is set
+ fail "Missing the required parameter 'body' when calling put_heartbeat_rules_rule_id" if body.nil?
+
+ # resource path
+ local_var_path = "/api/v2/alerting/heartbeat/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
+
+ # query parameters
+ query_params = {}
+
+ # header parameters
+ header_params = {}
+
+ # HTTP header 'Accept' (if needed)
+ _header_accept = ['application/json']
+ _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
+
+ # HTTP header 'Content-Type'
+ _header_content_type = ['application/json']
+ header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
+
+ # form parameters
+ form_params = {}
+
+ # http body (model)
+ post_body = @api_client.object_to_http_body(body)
+
+ auth_names = ['PureCloud Auth']
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => 'HeartBeatRule')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: AlertingApi#put_heartbeat_rules_rule_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Update an interaction stats alert read status