All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term


Callback API

Last updated:2020-06-16 16:21:21

A callback API enables your system to receive alarm messages directly from Kingsoft Cloud. By using HTTP POST requests, alarm messages are pushed to publicly accessible URLs for further processing.


  • Callback API: Provide a URL address to receive HTTP POST requests, which must be accessible through the public network, as the callback address.

  • Trigger callback: The trigger policy of the callback API is the same as that of the alarm SMS and email notifications. Alarm messages will be sent via the callback API when an alarm policy is triggered or restored.

  • Bind callback API: You can configure the callback API at the third step of creating an alarm policy. You can bind only one alarm callback URL to each alarm policy group.

Callback API parameters

The callback API will send the data in JSON format via HTTP POST requests. The parameters are as follows:

    "alarmState": 1,    // 1: Alarm. 0: Restore
    "alarmObjInfo": {
        "region": "Shanghai Region 2 (VPC)",              // Data center
        "namespace": "Eip",                     // Product type
        "tag": [                                //Instance ID
            "host=50fa05d9211b478293744280ac1592ag" ,
    "alarmPolicyInfo": {
        "policyId": 8888,                   // Policy ID
        "policyName": "test11",             // Policy name
        "conditions": [{                    // Policy rule
            "metricAlias": "CPU utilization",        // Metric name alias
            "metricName": "cpu.util",       // Metric name
            "period": "5m",                 // Statistical period
            "function": "avg",              // Operation function, which can be max, min, avg, or happen
            "points": "1",              // Continuous period
            "op": ">",                  // Comparison operator, which can be > or <
            "threshold": "50",          // Threshold
            "CurValue": "60",           // Current alarm value
            "units": "",                // Measurement unit
            "alarmInterval": "60",           // Alarm sending interval
            "alarmMax": "3",            // Maximum times of alarm sending
    "timestamp": "1547092067",          // Alarm timestamp
    "step": 1                       // Number of alarms
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen