--- title: AlertingApi --- ## PureCloud::AlertingApi All URIs are relative to *https://api.mypurecloud.com* Method | HTTP request | Description ------------- | ------------- | ------------- |[**delete_heartbeat_alerts_alert_id**](AlertingApi.html#delete_heartbeat_alerts_alert_id) | **DELETE** /api/v2/alerting/heartbeat/alerts/{alertId} | Delete a heart beat alert| |[**delete_heartbeat_rules_rule_id**](AlertingApi.html#delete_heartbeat_rules_rule_id) | **DELETE** /api/v2/alerting/heartbeat/rules/{ruleId} | Delete a heart beat rule.| |[**delete_interactionstats_alerts_alert_id**](AlertingApi.html#delete_interactionstats_alerts_alert_id) | **DELETE** /api/v2/alerting/interactionstats/alerts/{alertId} | Delete an interaction stats alert| |[**delete_interactionstats_rules_rule_id**](AlertingApi.html#delete_interactionstats_rules_rule_id) | **DELETE** /api/v2/alerting/interactionstats/rules/{ruleId} | Delete an interaction stats rule.| |[**get_heartbeat_alerts**](AlertingApi.html#get_heartbeat_alerts) | **GET** /api/v2/alerting/heartbeat/alerts | Get heart beat alert list.| |[**get_heartbeat_alerts_alert_id**](AlertingApi.html#get_heartbeat_alerts_alert_id) | **GET** /api/v2/alerting/heartbeat/alerts/{alertId} | Get a heart beat alert| |[**get_heartbeat_rules**](AlertingApi.html#get_heartbeat_rules) | **GET** /api/v2/alerting/heartbeat/rules | Get a heart beat rule list.| |[**get_heartbeat_rules_rule_id**](AlertingApi.html#get_heartbeat_rules_rule_id) | **GET** /api/v2/alerting/heartbeat/rules/{ruleId} | Get a heart beat rule.| |[**get_interactionstats_alerts**](AlertingApi.html#get_interactionstats_alerts) | **GET** /api/v2/alerting/interactionstats/alerts | Get interaction stats alert list.| |[**get_interactionstats_alerts_alert_id**](AlertingApi.html#get_interactionstats_alerts_alert_id) | **GET** /api/v2/alerting/interactionstats/alerts/{alertId} | Get an interaction stats alert| |[**get_interactionstats_alerts_unread**](AlertingApi.html#get_interactionstats_alerts_unread) | **GET** /api/v2/alerting/interactionstats/alerts/unread | Gets user unread count of interaction stats alerts.| |[**get_interactionstats_rules**](AlertingApi.html#get_interactionstats_rules) | **GET** /api/v2/alerting/interactionstats/rules | Get an interaction stats rule list.| |[**get_interactionstats_rules_rule_id**](AlertingApi.html#get_interactionstats_rules_rule_id) | **GET** /api/v2/alerting/interactionstats/rules/{ruleId} | Get an interaction stats rule.| |[**post_heartbeat_rules**](AlertingApi.html#post_heartbeat_rules) | **POST** /api/v2/alerting/heartbeat/rules | Create a heart beat rule.| |[**post_interactionstats_rules**](AlertingApi.html#post_interactionstats_rules) | **POST** /api/v2/alerting/interactionstats/rules | Create an interaction stats rule.| |[**put_heartbeat_rules_rule_id**](AlertingApi.html#put_heartbeat_rules_rule_id) | **PUT** /api/v2/alerting/heartbeat/rules/{ruleId} | Update a heart beat rule| |[**put_interactionstats_alerts_alert_id**](AlertingApi.html#put_interactionstats_alerts_alert_id) | **PUT** /api/v2/alerting/interactionstats/alerts/{alertId} | Update an interaction stats alert read status| |[**put_interactionstats_rules_rule_id**](AlertingApi.html#put_interactionstats_rules_rule_id) | **PUT** /api/v2/alerting/interactionstats/rules/{ruleId} | Update an interaction stats rule| {: class="table table-striped"} ## - delete_heartbeat_alerts_alert_id(alert_id) Delete a heart beat alert ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new alert_id = "alert_id_example" # String | Alert ID begin #Delete a heart beat alert api_instance.delete_heartbeat_alerts_alert_id(alert_id) rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->delete_heartbeat_alerts_alert_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_id** | **String**| Alert ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_heartbeat_rules_rule_id(rule_id) Delete a heart beat rule. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new rule_id = "rule_id_example" # String | Rule ID begin #Delete a heart beat rule. api_instance.delete_heartbeat_rules_rule_id(rule_id) rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->delete_heartbeat_rules_rule_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **String**| Rule ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_interactionstats_alerts_alert_id(alert_id) Delete an interaction stats alert ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new alert_id = "alert_id_example" # String | Alert ID begin #Delete an interaction stats alert api_instance.delete_interactionstats_alerts_alert_id(alert_id) rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->delete_interactionstats_alerts_alert_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_id** | **String**| Alert ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## - delete_interactionstats_rules_rule_id(rule_id) Delete an interaction stats rule. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new rule_id = "rule_id_example" # String | Rule ID begin #Delete an interaction stats rule. api_instance.delete_interactionstats_rules_rule_id(rule_id) rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->delete_interactionstats_rules_rule_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **String**| Rule ID | {: class="table table-striped"} ### Return type nil (empty response body) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**HeartBeatAlertContainer**](HeartBeatAlertContainer.html) get_heartbeat_alerts Get heart beat alert list. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new begin #Get heart beat alert list. result = api_instance.get_heartbeat_alerts p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_heartbeat_alerts: #{e}" end ~~~ ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**HeartBeatAlertContainer**](HeartBeatAlertContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**HeartBeatAlert**](HeartBeatAlert.html) get_heartbeat_alerts_alert_id(alert_id) Get a heart beat alert ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new alert_id = "alert_id_example" # String | Alert ID begin #Get a heart beat alert result = api_instance.get_heartbeat_alerts_alert_id(alert_id) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_heartbeat_alerts_alert_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_id** | **String**| Alert ID | {: class="table table-striped"} ### Return type [**HeartBeatAlert**](HeartBeatAlert.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**HeartBeatRuleContainer**](HeartBeatRuleContainer.html) get_heartbeat_rules Get a heart beat rule list. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new begin #Get a heart beat rule list. result = api_instance.get_heartbeat_rules p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_heartbeat_rules: #{e}" end ~~~ ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**HeartBeatRuleContainer**](HeartBeatRuleContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**HeartBeatRule**](HeartBeatRule.html) get_heartbeat_rules_rule_id(rule_id) Get a heart beat rule. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new rule_id = "rule_id_example" # String | Rule ID begin #Get a heart beat rule. result = api_instance.get_heartbeat_rules_rule_id(rule_id) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_heartbeat_rules_rule_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **String**| Rule ID | {: class="table table-striped"} ### Return type [**HeartBeatRule**](HeartBeatRule.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**InteractionStatsAlertContainer**](InteractionStatsAlertContainer.html) get_interactionstats_alerts Get interaction stats alert list. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new begin #Get interaction stats alert list. result = api_instance.get_interactionstats_alerts p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_interactionstats_alerts: #{e}" end ~~~ ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**InteractionStatsAlertContainer**](InteractionStatsAlertContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**InteractionStatsAlert**](InteractionStatsAlert.html) get_interactionstats_alerts_alert_id(alert_id) Get an interaction stats alert ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new alert_id = "alert_id_example" # String | Alert ID begin #Get an interaction stats alert result = api_instance.get_interactionstats_alerts_alert_id(alert_id) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_interactionstats_alerts_alert_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_id** | **String**| Alert ID | {: class="table table-striped"} ### Return type [**InteractionStatsAlert**](InteractionStatsAlert.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UnreadMetric**](UnreadMetric.html) get_interactionstats_alerts_unread Gets user unread count of interaction stats alerts. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new begin #Gets user unread count of interaction stats alerts. result = api_instance.get_interactionstats_alerts_unread p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_interactionstats_alerts_unread: #{e}" end ~~~ ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**UnreadMetric**](UnreadMetric.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**InteractionStatsRuleContainer**](InteractionStatsRuleContainer.html) get_interactionstats_rules Get an interaction stats rule list. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new begin #Get an interaction stats rule list. result = api_instance.get_interactionstats_rules p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_interactionstats_rules: #{e}" end ~~~ ### Parameters This endpoint does not need any parameter. {: class="table table-striped"} ### Return type [**InteractionStatsRuleContainer**](InteractionStatsRuleContainer.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**InteractionStatsRule**](InteractionStatsRule.html) get_interactionstats_rules_rule_id(rule_id) Get an interaction stats rule. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new rule_id = "rule_id_example" # String | Rule ID begin #Get an interaction stats rule. result = api_instance.get_interactionstats_rules_rule_id(rule_id) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->get_interactionstats_rules_rule_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **String**| Rule ID | {: class="table table-striped"} ### Return type [**InteractionStatsRule**](InteractionStatsRule.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**HeartBeatRule**](HeartBeatRule.html) post_heartbeat_rules(body) Create a heart beat rule. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new body = PureCloud::HeartBeatRule.new # HeartBeatRule | HeartBeatRule begin #Create a heart beat rule. result = api_instance.post_heartbeat_rules(body) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->post_heartbeat_rules: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**HeartBeatRule**](HeartBeatRule.html)| HeartBeatRule | {: class="table table-striped"} ### Return type [**HeartBeatRule**](HeartBeatRule.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**InteractionStatsRule**](InteractionStatsRule.html) post_interactionstats_rules(body) Create an interaction stats rule. ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new body = PureCloud::InteractionStatsRule.new # InteractionStatsRule | AlertingRule begin #Create an interaction stats rule. result = api_instance.post_interactionstats_rules(body) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->post_interactionstats_rules: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**InteractionStatsRule**](InteractionStatsRule.html)| AlertingRule | {: class="table table-striped"} ### Return type [**InteractionStatsRule**](InteractionStatsRule.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**HeartBeatRule**](HeartBeatRule.html) put_heartbeat_rules_rule_id(rule_id, body) Update a heart beat rule ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new rule_id = "rule_id_example" # String | Rule ID body = PureCloud::HeartBeatRule.new # HeartBeatRule | HeartBeatRule begin #Update a heart beat rule result = api_instance.put_heartbeat_rules_rule_id(rule_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->put_heartbeat_rules_rule_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **String**| Rule ID | **body** | [**HeartBeatRule**](HeartBeatRule.html)| HeartBeatRule | {: class="table table-striped"} ### Return type [**HeartBeatRule**](HeartBeatRule.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**UnreadStatus**](UnreadStatus.html) put_interactionstats_alerts_alert_id(alert_id, body) Update an interaction stats alert read status ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new alert_id = "alert_id_example" # String | Alert ID body = PureCloud::UnreadStatus.new # UnreadStatus | InteractionStatsAlert begin #Update an interaction stats alert read status result = api_instance.put_interactionstats_alerts_alert_id(alert_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->put_interactionstats_alerts_alert_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **alert_id** | **String**| Alert ID | **body** | [**UnreadStatus**](UnreadStatus.html)| InteractionStatsAlert | {: class="table table-striped"} ### Return type [**UnreadStatus**](UnreadStatus.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json ## -[**InteractionStatsRule**](InteractionStatsRule.html) put_interactionstats_rules_rule_id(rule_id, body) Update an interaction stats rule ### Example ~~~ruby # load the gem require 'purecloud' # setup authorization @secret = ENV['PURECLOUD_SECRET'] @id = ENV['PURECLOUD_CLIENT_ID'] environment = "mypurecloud.com" @authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment PureCloud.configure do |config| config.access_token = @authToken end api_instance = PureCloud::AlertingApi.new rule_id = "rule_id_example" # String | Rule ID body = PureCloud::InteractionStatsRule.new # InteractionStatsRule | AlertingRule begin #Update an interaction stats rule result = api_instance.put_interactionstats_rules_rule_id(rule_id, body) p result rescue PureCloud::ApiError => e puts "Exception when calling AlertingApi->put_interactionstats_rules_rule_id: #{e}" end ~~~ ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **rule_id** | **String**| Rule ID | **body** | [**InteractionStatsRule**](InteractionStatsRule.html)| AlertingRule | {: class="table table-striped"} ### Return type [**InteractionStatsRule**](InteractionStatsRule.html) ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json