class PureCloud::AlertingApi
Attributes
Public Class Methods
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete an interaction stats alert
@param alert_id Alert ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 32 def delete_alerting_interactionstats_alert(alert_id, opts = {}) delete_alerting_interactionstats_alert_with_http_info(alert_id, opts) return nil end
Delete an interaction stats alert
@param alert_id Alert ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 42 def delete_alerting_interactionstats_alert_with_http_info(alert_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.delete_alerting_interactionstats_alert ..." end # verify the required parameter 'alert_id' is set fail ArgumentError, "Missing the required parameter 'alert_id' when calling AlertingApi.delete_alerting_interactionstats_alert" if alert_id.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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_alerting_interactionstats_alert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete an interaction stats rule.
@param rule_id Rule ID @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 96 def delete_alerting_interactionstats_rule(rule_id, opts = {}) delete_alerting_interactionstats_rule_with_http_info(rule_id, opts) return nil end
Delete an interaction stats rule.
@param rule_id Rule ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 106 def delete_alerting_interactionstats_rule_with_http_info(rule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.delete_alerting_interactionstats_rule ..." end # verify the required parameter 'rule_id' is set fail ArgumentError, "Missing the required parameter 'rule_id' when calling AlertingApi.delete_alerting_interactionstats_rule" if rule_id.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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_alerting_interactionstats_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets active alert count for a user.
@param [Hash] opts the optional parameters @return [ActiveAlertCount]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 159 def get_alerting_alerts_active(opts = {}) data, _status_code, _headers = get_alerting_alerts_active_with_http_info(opts) return data end
Gets active alert count for a user.
@param [Hash] opts the optional parameters @return [Array<(ActiveAlertCount
, Fixnum, Hash)>] ActiveAlertCount
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 168 def get_alerting_alerts_active_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.get_alerting_alerts_active ..." end # resource path local_var_path = "/api/v2/alerting/alerts/active".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'ActiveAlertCount') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#get_alerting_alerts_active\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get an interaction stats alert
@param alert_id Alert ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [InteractionStatsAlert]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 216 def get_alerting_interactionstats_alert(alert_id, opts = {}) data, _status_code, _headers = get_alerting_interactionstats_alert_with_http_info(alert_id, opts) return data end
Get an interaction stats alert
@param alert_id Alert ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(InteractionStatsAlert
, Fixnum, Hash)>] InteractionStatsAlert
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 227 def get_alerting_interactionstats_alert_with_http_info(alert_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.get_alerting_interactionstats_alert ..." end # verify the required parameter 'alert_id' is set fail ArgumentError, "Missing the required parameter 'alert_id' when calling AlertingApi.get_alerting_interactionstats_alert" if alert_id.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'InteractionStatsAlert') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#get_alerting_interactionstats_alert\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 @option opts [Array<String>] :expand Which fields, if any, to expand @return [InteractionStatsAlertContainer]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 289 def get_alerting_interactionstats_alerts(opts = {}) data, _status_code, _headers = get_alerting_interactionstats_alerts_with_http_info(opts) return data end
Gets user unread count of interaction stats alerts.
@param [Hash] opts the optional parameters @return [UnreadMetric]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 352 def get_alerting_interactionstats_alerts_unread(opts = {}) data, _status_code, _headers = get_alerting_interactionstats_alerts_unread_with_http_info(opts) return data end
Gets user unread count of interaction stats alerts.
@param [Hash] opts the optional parameters @return [Array<(UnreadMetric
, Fixnum, Hash)>] UnreadMetric
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 361 def get_alerting_interactionstats_alerts_unread_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.get_alerting_interactionstats_alerts_unread ..." end # resource path local_var_path = "/api/v2/alerting/interactionstats/alerts/unread".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'UnreadMetric') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#get_alerting_interactionstats_alerts_unread\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 @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(InteractionStatsAlertContainer
, Fixnum, Hash)>] InteractionStatsAlertContainer
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 299 def get_alerting_interactionstats_alerts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.get_alerting_interactionstats_alerts ..." end # resource path local_var_path = "/api/v2/alerting/interactionstats/alerts".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'InteractionStatsAlertContainer') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#get_alerting_interactionstats_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get an interaction stats rule.
@param rule_id Rule ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [InteractionStatsRule]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 409 def get_alerting_interactionstats_rule(rule_id, opts = {}) data, _status_code, _headers = get_alerting_interactionstats_rule_with_http_info(rule_id, opts) return data end
Get an interaction stats rule.
@param rule_id Rule ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(InteractionStatsRule
, Fixnum, Hash)>] InteractionStatsRule
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 420 def get_alerting_interactionstats_rule_with_http_info(rule_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.get_alerting_interactionstats_rule ..." end # verify the required parameter 'rule_id' is set fail ArgumentError, "Missing the required parameter 'rule_id' when calling AlertingApi.get_alerting_interactionstats_rule" if rule_id.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'InteractionStatsRule') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#get_alerting_interactionstats_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get an interaction stats rule list.
@param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [InteractionStatsRuleContainer]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 482 def get_alerting_interactionstats_rules(opts = {}) data, _status_code, _headers = get_alerting_interactionstats_rules_with_http_info(opts) return data end
Get an interaction stats rule list.
@param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(InteractionStatsRuleContainer
, Fixnum, Hash)>] InteractionStatsRuleContainer
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 492 def get_alerting_interactionstats_rules_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.get_alerting_interactionstats_rules ..." end # resource path local_var_path = "/api/v2/alerting/interactionstats/rules".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] 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 => 'InteractionStatsRuleContainer') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#get_alerting_interactionstats_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 @option opts [Array<String>] :expand Which fields, if any, to expand @return [InteractionStatsRule]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 547 def post_alerting_interactionstats_rules(body, opts = {}) data, _status_code, _headers = post_alerting_interactionstats_rules_with_http_info(body, opts) return data end
Create an interaction stats rule.
@param body AlertingRule @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(InteractionStatsRule
, Fixnum, Hash)>] InteractionStatsRule
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 558 def post_alerting_interactionstats_rules_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.post_alerting_interactionstats_rules ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling AlertingApi.post_alerting_interactionstats_rules" if body.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/rules".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'InteractionStatsRule') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#post_alerting_interactionstats_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an interaction stats alert read status
@param alert_id Alert ID @param body InteractionStatsAlert
@param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [UnreadStatus]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 622 def put_alerting_interactionstats_alert(alert_id, body, opts = {}) data, _status_code, _headers = put_alerting_interactionstats_alert_with_http_info(alert_id, body, opts) return data end
Update an interaction stats alert read status
@param alert_id Alert ID @param body InteractionStatsAlert
@param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(UnreadStatus
, Fixnum, Hash)>] UnreadStatus
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 634 def put_alerting_interactionstats_alert_with_http_info(alert_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.put_alerting_interactionstats_alert ..." end # verify the required parameter 'alert_id' is set fail ArgumentError, "Missing the required parameter 'alert_id' when calling AlertingApi.put_alerting_interactionstats_alert" if alert_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling AlertingApi.put_alerting_interactionstats_alert" if body.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/alerts/{alertId}".sub('{format}','json').sub('{' + 'alertId' + '}', alert_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'UnreadStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#put_alerting_interactionstats_alert\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update an interaction stats rule
@param rule_id Rule ID @param body AlertingRule @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [InteractionStatsRule]
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 706 def put_alerting_interactionstats_rule(rule_id, body, opts = {}) data, _status_code, _headers = put_alerting_interactionstats_rule_with_http_info(rule_id, body, opts) return data end
Update an interaction stats rule
@param rule_id Rule ID @param body AlertingRule @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(InteractionStatsRule
, Fixnum, Hash)>] InteractionStatsRule
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/alerting_api.rb, line 718 def put_alerting_interactionstats_rule_with_http_info(rule_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AlertingApi.put_alerting_interactionstats_rule ..." end # verify the required parameter 'rule_id' is set fail ArgumentError, "Missing the required parameter 'rule_id' when calling AlertingApi.put_alerting_interactionstats_rule" if rule_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling AlertingApi.put_alerting_interactionstats_rule" if body.nil? # resource path local_var_path = "/api/v2/alerting/interactionstats/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'InteractionStatsRule') if @api_client.config.debugging @api_client.config.logger.debug "API called: AlertingApi#put_alerting_interactionstats_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end