Updates the notification with given parameters

Params

Param name Description
notification_action
required

Map containing the details of the notification action to be updated

Mandatory keys that should be sent from within the hash:
type: type of notification action to create, can be one of:
* EmailNotificationAction : Optional Parameters - "to", "cc", "bcc"
* CallHttpUrlAction : Optional Parameters - "url", "method"
* SensorTraitsAction : Optional Parameters - "body". body format {"traits" => {$key=>$value}}
Optional keys:
rule_key: rule_key of the rule for which the action should be associated

Value: Must be a Hash
pretty
optional

Return a pretty formatted response if true, Default is false


Value: Must be a Boolean

Examples

Request - update an email notification action
  curl -X PUT -H "Content-Type:application/json"  -H "X-Auth-Token:dpxgzEi6AzqMNgPrCUSxSg" -d '{"notification_action":{"type":"EmailNotificationAction","to":"ranjit@acme.com","cc":"bob@acme.com","bcc":"bill@acme.com"}}' https://api.datonis.io/api/v2/notification_actions/d83et2e5ae

Response (details of the notification action updated)
{
  "notification_action": {
    "bcc": "bill@acme.com",
    "body": null,
    "cc": "bob@acme.com",
    "notification_action_key": "d83et2e5ae",
    "subject": null,
    "to": "ranjit@acme.com",
    "type": "EmailNotificationAction"
  }
}
Request - update a call http url action
  curl -X PUT -H "Content-Type:application/json"  -H "X-Auth-Token:dpxgzEi6AzqMNgPrCUSxSg" -d '{"notification_action":{"type":"CallHttpUrlAction","method":"PUT","url":"http://examplehost.com/example_put_url"}}' https://api.datonis.io/api/v2/notification_actions/e45cf984c8

Response (details of the notification action updated)
{
  "notification_action": {
    "body": "",
    "headers": {
    },
    "method": "PUT",
    "notification_action_key": "e45cf984c8",
    "query": {
    },
    "url": "http://examplehost.com/example_put_url",
    "type": "CallHttpUrlAction"
  }
}
Request - update a sensor trait action
  curl -X PUT -H "Content-Type:application/json"  -H "X-Auth-Token:dpxgzEi6AzqMNgPrCUSxSg" -d '{"notification_action":{"type":"SensorTraitsAction","body":{"traits":{"Status":"Red"}}}}' https://api.datonis.io/api/v2/notification_actions/2131aacfte

Response (details of the notification action updated)
{
  "notification_action": {
    "body": "{\"traits\":{\"Status\":\"Red\"}}",
    "headers": {
    },
    "method": "PUT",
    "notification_action_key": "2131aacfte",
    "query": {
    },
    "url": "http://api.datonis.io/api/v1/sensors/$SENSOR$/set_traits",
    "type": "SensorTraitsAction"
  }
}