Search Rulesets

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

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

Limit your results - Use the optional fields parameter to limit the amount of information returned for each ruleset. 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 ruleset ID. This element is assigned by the service.

title (text)

The name of the ruleset.

description (text)

The user-provided description for the ruleset.

dateCreated (date)

The date the ruleset was created in UTC date/time format (YYYY-MM-DDTHH:MM:SSZ).

dateUpdated (date)

The date the ruleset was last updated in UTC date/time format (YYYY-MM-DDTHH:MM:SSZ).

Sample - Search RulesetsSample - Search Rulesets

API request

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

Request POST data

  
    <ServiceRequest>
     <filters>
       <Criteria field="title" operator="CONTAINS">critical</Criteria>
     </filters>
    </ServiceRequest>
    

Response

  
    <<?xml version="1.0" encoding="UTF-8"?>
    <ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://qualysapi.qualys.com/qps/
    xsd/1.0/cm/ruleset.xsd">
      <responseCode>SUCCESS</responseCode>
      <count>1</count>
      <hasMoreRecords>false</hasMoreRecords>
      <data>
        <RuleSet>
          <id>4001</id>
          <title>All Critical</title>
          <description>Critical security risks to be addressed immediately.</description>
          <dateCreated>2018-09-16T19:36:10Z</dateCreated>
          <dateUpdated>2018-09-16T19:36:10Z</dateUpdated>
          <isTemplate>false</isTemplate>
          <rule>
            <list>
              <Rule>
                <id>6001</id>
                <ruleType>HOST</ruleType>
                <eventTypes>HOST_FOUND, HOST_UPDATED, HOST_PURGED</eventTypes>
    <jsonData>{&quot;ruleType&quot;:&quot;HOST&quot;,&quot;eventTypes&quot;:[&quot;HOST_FOUND&quot;
    ,&quot;HOST_UPDATED&quot;,&quot;HOST_PURGED&quot;],&quot;criteria&quot;:[],&quot;uiState&quot;
    :{&quot;eventType.HOST_FOUND&quot;:&quot;on&quot;,&quot;eventType.HOST_UPDATED&quot;:&quot;on&quot;
    ,&quot;eventType.HOST_PURGED&quot;:&quot;on&quot;,&quot;operatingSystemType&quot;:&quot;&quot;
    ,&quot;operatingSystemValue&quot;:&quot;&quot;,&quot;hostnameType&quot;:&quot;&quot;,&quot;
    hostnameValue&quot;:&quot;&quot;,&quot;netbiosNameType&quot;:&quot;&quot;,&quot;netbiosNameValue&quot;
    :&quot;&quot;}}</jsonData>
                <dateCreated>2018-09-17T15:32:10Z</dateCreated>
              </Rule>
              <Rule>
                <id>6002</id>
                <ruleType>VULN</ruleType>
                <eventTypes>VULN_OPEN, VULN_CLOSED, VULN_ACTIVE, VULN_REOPENED</eventTypes>
    <jsonData>{&quot;ruleType&quot;:&quot;VULN&quot;,&quot;eventTypes&quot;:[&quot;VULN_OPEN&quot;
    ,&quot;VULN_CLOSED&quot;,&quot;VULN_ACTIVE&quot;,&quot;VULN_REOPENED&quot;],&quot;criteria&quot;
    :[],&quot;uiState&quot;:{&quot;eventType.VULN_OPEN&quot;:&quot;on&quot;,&quot;eventType.VULN_CLOSED&quot;
    :&quot;on&quot;,&quot;eventType.VULN_ACTIVE&quot;:&quot;on&quot;,&quot;eventType.VULN_REOPENED&quot;
    :&quot;on&quot;,&quot;titleType&quot;:&quot;&quot;,&quot;titleValue&quot;:&quot;&quot;,&quot;qidType&quot;
    :&quot;&quot;,&quot;qidValue&quot;:&quot;&quot;,&quot;cveType&quot;:&quot;&quot;,&quot;cveValue&quot;
    :&quot;&quot;}}</jsonData>
                <dateCreated>2018-09-17T15:32:11Z</dateCreated>
              </Rule>
            </list>
          </rule>
        </RuleSet>
      </data>
    </ServiceResponse>
    

XSDXSD

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