Search Alerts

[POST] /qps/rest/1.0/search/cm/alert/

Returns a list of alerts in the user's account.

Limit your results - Use the optional fields parameter to limit the amount of information returned for each alert. Learn more about limiting your results

Input ParametersInput Parameters

Allowed input elements are listed below. The associated data type for each element appears in parentheses. These elements are optional and act as filters. When multiple elements are specified, parameters are combined using a logical AND.

Click here for available operators.

Parameter

Description

id (integer)

The alert ID. This element is assigned by the service.

eventType (keyword)

The type of event that triggered the alert:

HOST_FOUND, HOST_UPDATED, HOST_PURGED, PORT_OPEN, PORT_CHANGED, PORT_CLOSED, SOFTWARE_ADDED, SOFTWARE_REMOVED, SSL_NEW, SSL_EXPIRED, SSL_EXPIRY, TICKET_OPEN, TICKET_RESOLVED, TICKET_CLOSED, VULN_OPEN, VULN_CLOSED, VULN_REOPENED, VULN_ACTIVE, VULN_PREDICTION_ADDED, VULN_PREDICTION_CHANGED, VULN_PREDICTION_CLOSED

ipAddress (text)

The impacted host’s IP address.

hostname (text)

The impacted host’s hostname.

isHidden (boolean)

Indicates whether the alert has been hidden from view. Possible values: true or false

eventDate (date)

The date of the event that triggered the alert in UTC date/time format (YYYY-MM-DDTHH:MM:SSZ).

alertDate (date)

The date of the alert in UTC date/time format (YYYY-MM-DDTHH:MM:SSZ).

profileTitle (text)

The name of the monitoring profile that resulted in the alert.

Sample - Search AlertsSample - Search Alerts

API request

 curl -u "USERNAME:PASSWORD" -H "content-type: text/xml" -X "POST" --data-binary @- "<qualys_base_url>/qps/rest/1.0/search/cm/alert/" < file.xml 

Request POST data

 
    <ServiceRequest>
     <filters>
       <Criteria field="ipAddress" operator="EQUALS">10.10.30.70</Criteria>
     </filters>
    </ServiceRequest>

Response

 
    <?xml version="1.0" encoding="UTF-8"?>
    <ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/1.0/cm/alert.xsd">
      <responseCode>SUCCESS</responseCode>
      <count>1</count>
      <hasMoreRecords>false</hasMoreRecords>
      <data>
        <Alert>
          <id>244402</id>
          <source>REMEDIATION</source>
          <eventType>SSL_NEW</eventType>
          <triggerUuid>3d41baf9-7caa-4269-9889-d7377aeaace5</triggerUuid>
          <ipAddress>10.10.30.70</ipAddress>
          <hostname>2k3-sp2-25-69.qualys.com</hostname>
          <eventDate>2018-06-04T10:57:43Z</eventDate>
          <alertDate>2018-06-04T10:57:48Z</alertDate>
          <isHidden>true</isHidden>
          <profile>
            <id>7401</id>
            <title>All Critical</title>
            <dateCreated>2018-09-16T19:54:48Z</dateCreated>
            <dateUpdated>2018-09-16T19:54:48Z</dateUpdated>
            <frequency>FREQ_NEVER</frequency>
            <isActive>true</isActive>
            <includedIps>10.10.10.1-10.10.31.255</includedIps>
            <targetList>10.10.10.1-10.10.31.255</targetList>
          </profile>
          <alertInfo>
            <port>0</port>
            <sslName>2k3-sp2-25-69.qualys.com</sslName>
            <sslIssuer>2k3-sp2-25-69.qualys.com</sslIssuer>
          </alertInfo>
        </Alert>
      </data>
    </ServiceResponse>
    

XSDXSD

 <platform API server>/qps/xsd/1.0/cm/alert.xsd