Queries alert contacts.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes SearchAlertContact

The operation that you want to perform. Set the value to SearchAlertContact.

ContactName String No John Doe

The name of the alert contact.

Phone String No 1381111*****

The mobile number of the alert contact.

Email String No someone@example.com

The email address of the alert contact.

CurrentPage String No 1

The number of the page to return.

PageSize String No 20

The number of entries to return on each page.

RegionId String Yes cn-hangzhou

The ID of the region. Set the value to cn-hangzhou.

ContactIds String No [12345]

The ID of the alert contact.

Response parameters

Parameter Type Example Description
RequestId String 21E85B16-75A6-429A-9F65-8AAC9A54****

The ID of the request.

PageBean Object

The struct returned.

PageNumber Integer 1

The page number of the returned page.

PageSize Integer 10

The number of entries returned per page.

TotalCount Integer 23

The total number of returned entries.

Contacts Array of Contact

The information about the alert contacts.

UpdateTime Long 1580258717000

The timestamp when the alert contact was updated.

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

The webhook URL of the DingTalk chatbot.

Webhook String {\"body\":\"{ \\\"msg_type\\\": \\\"text\\\", \\\"content\\\": { \\\"text\\\": \\\"$content\\\" } }\",\"header\":{\"Arms-Content-Type\":\"json\"},\"method\":\"post\",\"params\":{},\"url\":\"https://***",\"userId\":\"1131971649***\"}",

The information about the webhook.

Email String someone@example.com

The email address of the alert contact.

ContactId Long 123

The ID of the alert contact.

CreateTime Long 1572349025000

The timestamp when the alert contact was created.

UserId String 113197164949****

The ID of the user.

ContactName String John Doe

The name of the alert contact.

SystemNoc Boolean false

Indicates whether the alert contact receives system notifications. Valid values:

  • true: The alert contact receives system notifications.
  • false: The alert contact does not receive system notifications.
Content String Default Group | SRE Group

The contact group to which the contact belongs. If your contacts are added to multiple contact groups, the contact groups are separated by vertical bars (|).

Phone String 1381111*****

The mobile number of the alert contact.

Examples

Sample requests

http(s)://[Endpoint]/?Action=SearchAlertContact
&ContactName=John Doe
&Phone=1381111*****
&Email=someone@example.com
&CurrentPage=1
&PageSize=20
&RegionId=cn-hangzhou
&ContactIds=[12345]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<SearchAlertContactResponse>
    <RequestId>21E85B16-75A6-429A-9F65-8AAC9A54****</RequestId>
    <PageBean>
        <PageNumber>1</PageNumber>
        <PageSize>10</PageSize>
        <TotalCount>23</TotalCount>
        <Contacts>
            <UpdateTime>1580258717000</UpdateTime>
            <DingRobot>https://oapi.dingtalk.com/robot/send?access_token=91f2f6****</DingRobot>
            <Webhook>{\"body\":\"{   \\\"msg_type\\\": \\\"text\\\",   \\\"content\\\": {     \\\"text\\\": \\\"$content\\\"   } }\",\"header\":{\"Arms-Content-Type\":\"json\"},\"method\":\"post\",\"params\":{},\"url\":\"https://***",\"userId\":\"1131971649***\"}",</Webhook>
            <Email>someone@example.com</Email>
            <ContactId>123</ContactId>
            <CreateTime>1572349025000</CreateTime>
            <UserId>113197164949****</UserId>
            <ContactName>John Doe</ContactName>
            <SystemNoc>false</SystemNoc>
            <Content>Default Group | SRE Group</Content>
            <Phone>1381111*****</Phone>
        </Contacts>
    </PageBean>
</SearchAlertContactResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "21E85B16-75A6-429A-9F65-8AAC9A54****",
  "PageBean" : {
    "PageNumber" : 1,
    "PageSize" : 10,
    "TotalCount" : 23,
    "Contacts" : {
      "UpdateTime" : 1580258717000,
      "DingRobot" : "https://oapi.dingtalk.com/robot/send?access_token=91f2f6****",
      "Webhook" : "{\\\"body\\\":\\\"{   \\\\\\\"msg_type\\\\\\\": \\\\\\\"text\\\\\\\",   \\\\\\\"content\\\\\\\": {     \\\\\\\"text\\\\\\\": \\\\\\\"$content\\\\\\\"   } }\\\",\\\"header\\\":{\\\"Arms-Content-Type\\\":\\\"json\\\"},\\\"method\\\":\\\"post\\\",\\\"params\\\":{},\\\"url\\\":\\\"https://***\",\\\"userId\\\":\\\"1131971649***\\\"}\",",
      "Email" : "someone@example.com",
      "ContactId" : 123,
      "CreateTime" : 1572349025000,
      "UserId" : "113197164949****",
      "ContactName" : "John Doe",
      "SystemNoc" : false,
      "Content" : "Default Group | SRE Group",
      "Phone" : "1381111*****"
    }
  }
}