Email Action Configuration APIs


These APIs allow an admin user to configure e-mail to be sent to specified persons in the event of an alarm. Email Action Configuration APIs are designed to support GET and POST requests:

Request Parameters

The parameters involved in executing this API request are:

Field Description
emailactionname Any display name for the action. If the display name of the email action contains a special character like # , & or + :
  • # should be replaced with %23
  • & should be repalced with %26
  • + should be replaced with %2B

while passing the emailactionname parameter in the RESTAPI.

subject The subject of the e-mail.
message The message of the e-mail.
businesstype

Possible Values are:

  • 1 - Execute during business hour
  • 0 - Execute outside business hour
mailformat The format of the message: HTML, Plain Text or Both.
smtpserver The Server IP or host name of the host in which the SMTP server runs.
smtpport SMTP Port. 25 by default.
businesshouraction True if a business hour needs to be associated to this action
businessid Business ID
appendmessage Choose whether to append the alarm information generated by Applications Manager to the Email. True or false
toaddress The receiver's address.
fromaddress The sender's address

Create Email Action

This API allows an admin user to create an email action in Applications Manager.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/actions/emailaction?apikey=[ API Key ]&subject=[ Subject]&businesstype=[ Type]&mailformat=[ HTML/Plain Text/Both]&smtpserver=[ SMTP Server]&fromaddress=[ Sender address]&emailactionname=[ Name ]&businesshouraction=[ True/False ]&message=[ Message Text ]&businessid=[ Business ID]&toaddress=[ Receiver's Address]&appendmessage=[ True/False ]&smtpport=[ Port ]

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/actions/emailaction?apikey=[ API Key ]&subject=[ Subject]&businesstype=[ Type]&mailformat=[ HTML/Plain Text/Both]&smtpserver=[ SMTP Server]&fromaddress=[ Sender address]&emailactionname=[ Name ]&businesshouraction=[ True/False ]&message=[ Message Text ]&businessid=[ Business ID]&toaddress=[ Receiver's Address]&appendmessage=[ True/False ]&smtpport=[ Port ]

Example

http://app-windows:59090/AppManager/xml/actions/emailaction?apikey=09eebdd6893db4d20e16b84dff6664f1&subject=(Admin) Alarm from the Applications Manager&businesstype=1&mailformat=both&smtpserver=smtp&fromaddress=vijay@appmanager.com&emailactionname=Applications manager&businesshouraction=true&message=This information has been generated by the Applications Manager&businessid=10000&toaddress=vijayakumar.mariappan@zohocorp.com&appendmessage=true&smtpport=25

Update Email Action

This API allows an admin user to edit any email action configured in Applications Manager.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/actions/emailaction?apikey=[ API Key ]&subject=[ Subject]&businesstype=[ Business Type]&mailformat=[ HTML/Plain Text/Both]&smtpserver=[ SMTP Server]&fromaddress=[ Sender address]&businesshouraction=[ True/False ]&message=[ Message Text ]&emailactionid=[ ID ]&businessid= ID ]&toaddress=[ Receiver's Address]&appendmessage=[ True/False ]&displayname=[ Display Name]&smtpport=[ Port ]

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/actions/emailaction?apikey=[ API Key ]&subject=[ Subject]&businesstype=[ Business Type]&mailformat=[ HTML/Plain Text/Both]&smtpserver=[ SMTP Server]&fromaddress=[ Sender address]&businesshouraction=[ True/False ]&message=[ Message Text ]&emailactionid=[ ID ]&businessid= ID ]&toaddress=[ Receiver's Address]&appendmessage=[ True/False ]&displayname=[ Display Name]&smtpport=[ Port ]

Example

http://app-windows:59090/AppManager/xml/actions/emailaction?apikey=09eebdd6893db4d20e16b84dff6664f1&subject=(Admin) Alarm from the Applications Manager&businesstype=0&mailformat=html&smtpserver=smtp&fromaddress=vijay@appmanager.com&businesshouraction=true&message=This information has been generated by the Applications Manager&emailactionid=10000&businessid=10000&toaddress=vijayakumar.mariappan@zohocorp.com&appendmessage=true&displayname=Applications manager&smtpport=25

Delete Email Action

This API allows an admin user to delete an email action in Applications Manager.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/actions/emailaction?apikey=[ API Key ]&emailactionid=[Business Id],&TO_DELETE=true

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/actions/emailaction?apikey=[ API Key ]&emailactionid=[Business Id],&TO_DELETE=true

Example

http://app-windows:59090/AppManager/xml/actions/emailaction?apikey=09eebdd6893db4d20e16b84dff6664f1&emailactionid=10000,&TO_DELETE=true

List Email Actions

This API allows an admin user to list down the email actions in Applications Manager.

Syntax

For XML Response:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/actions/emailaction?apikey=[ API Key ]

For JSON Response:

http://[ APM Host ]:[ APM Port ]/AppManager/json/actions/emailaction?apikey=[ API Key ]

Example

http://app-windows:59090/AppManager/xml/actions/emailaction?apikey=09eebdd6893db4d20e16b84dff6664f1