All Products
Search
Document Center

Application Real-Time Monitoring Service:DescribeWebhookContacts

Last Updated:May 09, 2024

Queries the list of webhook alert contacts.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
arms:SearchContactWrite
  • All Resources
    *
    none
none

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
WebhookContactsobject []

The list of webhook alert contacts.

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 changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.