Getting Notification Settings
This section explains how to get a list of existing notification settings.
Request
GET https://<hostname>/api/v1/settings/emailNotifications |
Request Headers
The request header must contain an authorization token of the current session.
Request Parameters
None.
Request Body
None.
Response
The server returns the following response to the client.
Response Codes
A successfully completed operation returns a response code 200 (OK).
Response Headers
The response to this request contains the following headers. The response may also include additional standard HTTPS headers.
Header | Description |
Content-length | The length of the response body. |
Content-type | The media type and syntax of the response body message: application/json; charset=utf-8 |
Response Body
Property | Type | Description |
|---|---|---|
smtpSettings | Contains the SmtpSettings object. | |
notificationsEnabled | boolean | Shows if the email notifications are enabled. |
from | string | Show the sender address. |
to | string | Shows the recipient address. |
subject | string | Shows the subject. |
dailyReportSettings | Contains the DailyReportSettings object. | |
emailNotificationSettings | Contains the EventEmailNotificationSettings object. |
Property | Type | Description |
|---|---|---|
account | Contains the StandardAccount object. | |
host | string | Shows the name of the SMTP server. |
port | integer | Shows the port number of the SMTP server. |
useSecureConnection | boolean | Shows if a secure connection is enabled. |
timeOutMiliSeconds | integer | Shows the timeout value. |
Property | Type | Description |
|---|---|---|
id | integer | Shows the identification number if the standard account that is used to for authentication on the SMTP server. |
name | string | Shows the name of the standard account. |
Property | Type | Description |
|---|---|---|
sendDailyReport | boolean | Shows if a daily report must be sent at the specified time. |
dailyTime | string | Shows when to send a daily report. |
EventEmailNotificationSettings Object
Property | Type | Description |
|---|---|---|
notifyOnSuccess | boolean | Shows if a notification must be sent on each Success session of a backup policy. |
notifyOnWarning | boolean | Shows if a notification must be sent on each Warning session of a backup policy. |
notifyOnFailure | boolean | Shows if a notification must be sent on each Failure session of a backup policy. |
Example
Request: GET https://abc.ukwest.cloudapp.azure.com/api/v1/settings/emailNotifications
Request Header: Authorization: Bearer <Access-Token>
Response: 200 OK
Response Body: { "smtpSettings": { "account": { "id": 1, "name": "Standard Account" }, "host": "gamma.tech.local", "port": 25, "useSecureConnection": true, "timeOutMiliSeconds": 100000 }, "notificationsEnabled": true, "from": "administrator@tech.local", "to": "group@.com", "subject": "[%JobResult%] %JobName% (%VmCount% virtual machines) %Issues%", "dailyReportSettings": { "sendDailyReport": true, "dailyTime": "00:00:00" }, "emailNotificationSettings": { "notifyOnSuccess": true, "notifyOnWarning": true, "notifyOnFailure": true } } |