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"
* ThingUserDefinedPropertiesAction : Optional Parameters - "body". body format {"user_defined_properties" => {$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:SMvLmYkkIVSYrrEQZSix0Q" -d '{"notification_action":{"type":"EmailNotificationAction","to":"aboli@altizon.com","cc":"mayank@altizon.com","bcc":"atul@altizon.com"}}' https://api.datonis.io/api/v3/notification_actions/49ffa24fet

Response (details of the notification action updated)
{
  "notification_action": {
    "bcc": "atul@altizon.com",
    "body": null,
    "cc": "mayank@altizon.com",
    "created_at": 1448515909,
    "notification_action_key": "49ffa24fet",
    "subject": null,
    "to": "aboli@altizon.com",
    "updated_at": 1448516424,
    "type": "EmailNotificationAction"
  }
}
Request - update a call http url action
  curl -X PUT -H "Content-Type:application/json"  -H "X-Auth-Token:SMvLmYkkIVSYrrEQZSix0Q" -d '{"notification_action":{"type":"CallHttpUrlAction","method":"GET","url":"https://api.datonis.io/api/v3/things"}}' https://api.datonis.io/api/v3/notification_actions/7b6f47t5f5

Response (details of the notification action updated)
{
  "notification_action": {
    "body": "",
    "created_at": 1448516142,
    "headers": {
    },
    "method": "GET",
    "notification_action_key": "7b6f47t5f5",
    "query": {
    },
    "updated_at": 1448516553,
    "url": "https://api.datonis.io/api/v3/things",
    "type": "CallHttpUrlAction"
  }
}
Request - update a thing user defined property action
  curl -X PUT -H "Content-Type:application/json"  -H "X-Auth-Token:SMvLmYkkIVSYrrEQZSix0Q" -d '{"notification_action":{"type":"ThingUserDefinedPropertiesAction","body":{"user_defined_properties":{"Status":"Green"}}}}' https://api.datonis.io/api/v3/notification_actions/e4b268b9ca

Response (details of the notification action updated)
{
  "notification_action": {
    "body": "{\"user_defined_properties\":{\"Status\":\"Green\"}}",
    "created_at": 1448516262,
    "headers": {
    },
    "method": "PUT",
    "notification_action_key": "e4b268b9ca",
    "query": {
    },
    "updated_at": 1448516768,
    "url": "http://localhost:3000/api/v3/things/$THING$/set_user_defined_properties",
    "type": "ThingUserDefinedPropertiesAction"
  }
}