Developers API

assignAlertGroup

Assign an Alert Group to a Host. Different Alert Groups can be specified for alerts generated by Uptime Monitoring, and for alerts generated by Metrics. The "mode" parameter is used to differentiate between them.

Request Parameters

Parameter Data Type Description Required Default
mode enum Specify UPTIME for alerts generated by Uptime Monitoring, or METRICS for Metrics-generated alerts. Required -
groupid integer The ID of the Alert Group to be assigned, or -1 to disable alerts (Metrics only) Required -
hostid integer The ID of the host to which you wish to assign the Alert Group. Required -

Response Data

Response Variable Data Type Description
errorcode integer Returns an errorcode of 0 if call is successful.
Try it out with the API Explorer:

Your API Key

API command to be called

Desired response format

Specify UPTIME for alerts generated by Uptime Monitoring, or METRICS for Metrics-generated alerts. (enum)

The ID of the Alert Group to be assigned, or -1 to disable alerts (Metrics only) (integer)

The ID of the host to which you wish to assign the Alert Group. (integer)