When registering a Webhook in the Device Manager alert rule, please provide the following information:
When device generates an alert, it will send the alert information to the Webhook URL you configured via a POST request. The alert content will be transmitted in JSON format and encoded using UTF-8.
Request Header:
Request body (example alert message) :
Field description:
| Field | Type | Description |
| string | Alert ID. |
| string | The ID of the alert device. |
| string | Device name. |
| string | The device serial number of the alert. |
| string | Alert rule ID. |
| string | Alert rule name. |
| string | Alert type. |
| array | Notify the user. |
| array | Type of notification: email,sms,webhook. |
| date | The create time of the alert. |
| string | Alert content. |
| date | The update time of the alert. |
Alert type:
Retry Mechanism:
When network errors or request timeouts occur, the request may fail. The system will automatically retry the request until the maximum retry limit is reached or the request is successful. The default retry count is 3, with a 10-second interval between retries.
Note: Retries will not be triggered when the service cannot be reached, such as in cases of DNS resolution errors, service shutdown, etc.
If no secret token is configured, there is no need to validate the signature.
If a secret token is configured, you can validate the signature using the following steps:
When your Webhook endpoint successfully receives and processes the alert, it should return an HTTP 200 OK status code.
If request processing fails, return the appropriate error status code (e.g., 400 or 500) and ensure that the error information is properly logged.
Notes:
By following the above steps, you can efficiently and securely receive and process Device Manager alert Webhook events.