Search Rulesets
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>{"ruleType":"HOST","eventTypes":["HOST_FOUND"
,"HOST_UPDATED","HOST_PURGED"],"criteria":[],"uiState"
:{"eventType.HOST_FOUND":"on","eventType.HOST_UPDATED":"on"
,"eventType.HOST_PURGED":"on","operatingSystemType":""
,"operatingSystemValue":"","hostnameType":"","
hostnameValue":"","netbiosNameType":"","netbiosNameValue"
:""}}</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>{"ruleType":"VULN","eventTypes":["VULN_OPEN"
,"VULN_CLOSED","VULN_ACTIVE","VULN_REOPENED"],"criteria"
:[],"uiState":{"eventType.VULN_OPEN":"on","eventType.VULN_CLOSED"
:"on","eventType.VULN_ACTIVE":"on","eventType.VULN_REOPENED"
:"on","titleType":"","titleValue":"","qidType"
:"","qidValue":"","cveType":"","cveValue"
:""}}</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