Add SMTP alert profile
Adds a new SMTP email profile. Multiple profiles can be created to allow different options to be applied to each one, so that different recipients can receive different alert information from the system.
Valid notification frequency values are: IMMEDIATELY, SUMMARY or NEVER. Information alerts can’t be sent more frequently than Warning alerts, and Warning alerts can’t be sent more frequently than Severe alerts.
HTTP request syntax (URI)
POST <base_URI>/v8/storage/file-devices/alerts/smtp/profiles
Parameters
Name | Type | Required | Values | Description |
discloseDetails | BODY | N | boolean | Disclose details in the emails (IP addresses, etc). Default True. |
excludeAttachments | BODY | N | boolean | Excludes attachments for this profile. Default False. |
htmlFormat | BODY | N | boolean | Sends the emails in HTML format. Default True. |
ignoreNdmpEvents | BODY | N | boolean | Ignore NDMP events in emails which are sent immediately. Default False. |
isEnabled | BODY | N | boolean | Enables/disables the profile. Default True. |
maxEmailLength | BODY | N | integer | Maximum possible email length, in bytes. Default 65536 bytes. |
name | BODY | Y | string | Name of the new email alert profile. |
notificationFrequencyInfo | BODY | N | string | Frequency to send Information severity alerts. Default Never. |
notificationFrequencyWarning | BODY | N | string | Frequency to send Warning severity alerts. Default Never. |
notificationFrequencySevere | BODY | N | string | Frequency to send Severe severity alerts. Default Never. |
recipients | BODY | N | list of strings | List of email recipients. |
sendDailyStatusEmails | BODY | N | boolean | Sends a daily status email. Default True. |
sendEmptyEmails | BODY | N | boolean | Sends empty summary emails if there are no alerts to send. Default True. |
summaryTimes | BODY | N | list of strings | List of times that summary emails will be sent. Times must be of the form HH:MM. Two summary times can be specified. Default 08:00. |
Text | BODY | N | string | Arbitrary text to include at the beginning of the email body. |
uuEncode | BODY | N | boolean | Uuencode diagnostic emails. Default True. |
Return codes
Code | Data | Description |
201 | emailProfile | SMTP alert profile successfully created. |
400 | Error Message | Missing or invalid request contents. |
403 | Error Message | Operation forbidden by access level. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
Any HTTP status code other than 201 indicates that the API did not complete successfully.
Request example: Create a new SMTP email profile, with two recipients
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/file-devices/alerts/smtp/profiles -X POST -d '{"name":"profile2", "recipients":["bob@example.com", "dave@example.com"]}'
Response example
HTTP/1.1 201 Created { "emailProfile": { "discloseDetails": true, "excludeAttachments": false, "htmlFormat": true, "ignoreNdmpEvents": false, "isEnabled": true, "maxEmailLength": 65536, "name": "profile2", "notificationFrequencyInfo": "NEVER", "notificationFrequencySevere": "NEVER", "notificationFrequencyWarning": "NEVER", "objectId": "70726f66696c65323a3a3a303a3a3a4f49445f24232140255f56", "recipients": [ "bob@example.com", "dave@example.com" ], "sendDailyStatusEmails": true, "sendEmptyEmails": true, "summaryTimes": [ "08:00" ], "text": "", "uuEncode": true }, "uri": "https://172.27.5.11:8444/v8/storage/file-devices/alerts/smtp/profiles/70726f66696c65323a3a3a303a3a3a4f49445f24232140255f56" }