这些API允许管理员用户配置告警发生时发送给指定人员的电子邮件。电子邮件动作配置API旨在支持GET和POST请求:
执行此API请求所涉及的参数包括:
字段 | 描述 |
---|---|
emailactionname | 动作的任何显示名称。如果电子邮件动作的显示名称包含特殊字符,例如#,&或+:
同时在RESTAPI中传递emailactionname参数。
|
subject | 电子邮件的主题。 |
message | 电子邮件消息。 |
businesstype | 可能的值为:
|
mailformat | 消息的格式:HTML,纯文本或两者。 |
smtpserver | 运行SMTP服务器的主机的服务器IP或主机名。 |
smtpport | SMTP端口。默认为25。 |
businesshouraction | 如果需要将工作时间与该动作关联,则为True |
businessid | 业务ID |
appendmessage | 选择是否将Applications Manager生成的告警信息附加到电子邮件中 True or false |
toaddress | 收件人地址。 |
fromaddress | 发件人地址 |
该API允许管理员用户在Applications Manager中创建电子邮件动作。
对于XML响应:
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 ]
对于JSON响应:
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 ]
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
该API允许管理员用户编辑在Applications Manager中配置的任何电子邮件动作。
对于XML响应:
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 ]
对于JSON响应:
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 ]
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
该API允许管理员用户在Applications Manager中删除电子邮件动作。
对于XML响应:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/actions/emailaction?apikey=[ API Key ]&emailactionid=[Business Id],&TO_DELETE=true
对于JSON响应:
http://[ APM Host ]:[ APM Port ]/AppManager/json/actions/emailaction?apikey=[ API Key ]&emailactionid=[Business Id],&TO_DELETE=true
http://app-windows:59090/AppManager/xml/actions/emailaction?apikey=09eebdd6893db4d20e16b84dff6664f1&emailactionid=10000,&TO_DELETE=true
该API允许管理员用户在Applications Manager中列出电子邮件动作。
对于XML响应:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/actions/emailaction?apikey=[ API Key ]
对于JSON响应:
http://[ APM Host ]:[ APM Port ]/AppManager/json/actions/emailaction?apikey=[ API Key ]
http://app-windows:59090/AppManager/xml/actions/emailaction?apikey=09eebdd6893db4d20e16b84dff6664f1