All Products
Search
Document Center

Application Real-Time Monitoring Service:DescribeWebhookContacts

Last Updated:Nov 05, 2024

Queries the list of webhook alert contacts.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
WebhookNamestringNo

The name of the webhook alert contact.

Webhook name
PagelongYes

The number of the page to return.

1
SizelongYes

The number of alert contacts displayed on each page.

20
ContactIdsstringNo

The ID of the alert contact.

123

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

4D6C358A-A58B-4F4B-94CE-F5AAF023****
PageBeanobject

The returned objects.

Totallong

The total number of alert contacts.

1
Pagelong

The page number of the returned page.

1
Sizelong

The number of alert contacts displayed on each page.

20
WebhookContactsarray<object>

The list of webhook alert contacts.

webhookContactsobject
WebhookIdfloat

The ID of the webhook alert contact.

123
WebhookNamestring

The name of the webhook alert contact.

Webhook name
Webhookobject

The details of the webhook alert contact.

Methodstring

The HTTP request method.

  • Get
  • Post
Post
Urlstring

The URL of the request method.

https://oapi.dingtalk.com/robot/send?access_token=91f2f6****
BizHeadersobject

The header of the HTTP request.

[{"Content-Type":"application/json"}]
BizParamsobject

The parameters in the HTTP request.

[{"content:"mike"}]
Bodystring

The alert notification template.

{ "Alert name":"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}", "Cluster name":"{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels.\_aliyun_arms_involvedObject_kind }}", "Application name":"{{ .commonLabels.\_aliyun_arms_involvedObject_name }} {{ end }}", "Notification policy":"{{ .dispatchRuleName }}", "Alert time":"{{ .startTime }}", "Alert content":"{{ for .alerts }} {{ .annotations.message }} {{ end }}" }
RecoverBodystring

The notification template for clearing alerts.

{ "Alert name":"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}", "Cluster name":"{{ .commonLabels.clustername }} {{ end }}{{if eq "app" .commonLabels.\_aliyun_arms_involvedObject_kind }}", "Application name":"{{ .commonLabels.\_aliyun_arms_involvedObject_name }} {{ end }}", "Notification policy":"{{ .dispatchRuleName }}", "Recovery time":"{{ .endTime }}", "Alert content":"{{ for .alerts }} {{ .annotations.message }} {{ end }}" }

Examples

Sample success responses

JSONformat

{
  "RequestId": "4D6C358A-A58B-4F4B-94CE-F5AAF023****",
  "PageBean": {
    "Total": 1,
    "Page": 1,
    "Size": 20,
    "WebhookContacts": [
      {
        "WebhookId": 123,
        "WebhookName": "Webhook name\n",
        "Webhook": {
          "Method": "Post",
          "Url": "https://oapi.dingtalk.com/robot/send?access_token=91f2f6****",
          "BizHeaders": [
            {
              "Content-Type": "application/json"
            }
          ],
          "BizParams": {
            "test": "test",
            "test2": 1
          },
          "Body": "{ \"Alert name\":\"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\", \"Cluster name\":\"{{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels.\\_aliyun_arms_involvedObject_kind }}\", \"Application name\":\"{{ .commonLabels.\\_aliyun_arms_involvedObject_name }} {{ end }}\", \"Notification policy\":\"{{ .dispatchRuleName }}\", \"Alert time\":\"{{ .startTime }}\", \"Alert content\":\"{{ for .alerts }} {{ .annotations.message }} {{ end }}\" }\n",
          "RecoverBody": "{ \"Alert name\":\"{{ .commonLabels.alertname }}{{if .commonLabels.clustername }}\", \"Cluster name\":\"{{ .commonLabels.clustername }} {{ end }}{{if eq \"app\" .commonLabels.\\_aliyun_arms_involvedObject_kind }}\", \"Application name\":\"{{ .commonLabels.\\_aliyun_arms_involvedObject_name }} {{ end }}\", \"Notification policy\":\"{{ .dispatchRuleName }}\", \"Recovery time\":\"{{ .endTime }}\", \"Alert content\":\"{{ for .alerts }} {{ .annotations.message }} {{ end }}\" }\n"
        }
      }
    ]
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-01-07The response structure of the API has changedView Change Details