List Policies

GET POST/api/2.0/fo/compliance/control/?action=list

View a list of compliance policies visible to the user. By default, the compliance policy list output shows all compliance policies in the subscription. Optional input parameters allow you to set filters to restrict the policy list output to policies with certain compliance policy IDs.

Permissions - Click here to view permissions info

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=list

Required

String 

Specify action to list all the policies.

echo_request={0|1}

Optional

Integer 

Specify 1 to view (echo) input parameters in the XML output. By default these are not included.

details={Basic|All|None}

Optional

Boolean 

Show the requested amount of host information for each host. A valid value is:

Basic - (default) Includes all policy details except technology list for each control, IP list for each asset group, and a user list

All - includes all policy details

None - includes policy ID and title

ids={value}

Optional

Integer 

Show only certain policy IDs/ranges. One or more policy IDs/ranges may be specified. Valid host IDs are required. Multiple entries are comma separated. A policy ID range is specified with a hyphen (for example, 160-165).

id_min={value}

Optional

Integer 

Show only policies which have a minimum policy ID value. A valid policy ID is required.

id_max={value}

Optional

Integer 

Show only policies which have a maximum policy ID value. A valid policy ID is required.

updated_after_datetime= {value}

Optional

Integer 

Show only controls updated after a certain date/time. See Date Filters.

created_after_datetime= {value}

Optional

Integer 

Show only controls created after a certain date/time. See Date Filters.

Date Filter

The date/time is specified in YYYY-MM-DD{THH:MM:SSZ] format (UTC/GMT), like “2010-03-01” or “2010-03-01T23:12:00Z”

If you specify a date but no time as for example 2010-03-01, then the service automatically sets the time to 2010-03-01T00:00:00Z (the start of the day).

When date filters are specified using both input parameters for a single API request, both date filters are satisfied (ANDed).

Sample - List Policies, All DetailsSample - List Policies, All Details

API Request

https://<qualys_base_url>/api/2.0/fo/compliance/policy/?action=list&details=All

XML Output

<!DOCTYPE POLICY_LIST_OUTPUT SYSTEM "https://<qualys_base_url>/api/2.0/fo/compliance/policy/policy_list_output.dtd">
<POLICY_LIST_OUTPUT>
  <RESPONSE>
    <DATETIME>2016-11-03T21:15:29Z</DATETIME>
    <POLICY_LIST>
      <POLICY>
        <ID>18948</ID>
        <TITLE><![CDATA[XP policy]]></TITLE>
        <CREATED>
          <DATETIME>2016-10-19T18:37:15Z</DATETIME>
          <BY>quays_as</BY>
        </CREATED>
        <LAST_MODIFIED>
          <DATETIME>2016-10-26T23:31:57Z</DATETIME>
          <BY>quays_as</BY>
        </LAST_MODIFIED>
        <LAST_EVALUATED>
          <DATETIME>2016-11-03T08:40:44Z</DATETIME>
        </LAST_EVALUATED>
        <STATUS><![CDATA[active]]></STATUS>
        <IS_LOCKED>0</IS_LOCKED>
        <EVALUATE_NOW><![CDATA[yes]]></EVALUATE_NOW>
        <ASSET_GROUP_IDS>6065</ASSET_GROUP_IDS>
        <TAG_SET_INCLUDE>
          <TAG_ID>7588415</TAG_ID>
        </TAG_SET_INCLUDE>
        <TAG_INCLUDE_SELECTOR>ANY</TAG_INCLUDE_SELECTOR>
        <INCLUDE_AGENT_IPS>1</INCLUDE_AGENT_IPS>
        <CONTROL_LIST>
          <CONTROL>
            <ID>1045</ID>
            <STATEMENT><![CDATA[Status of the 'Clipbook' service (startup type)]]></STATEMENT>
            <CRITICALITY>
              <LABEL><![CDATA[SERIOUS]]></LABEL>
              <VALUE>3</VALUE>
            </CRITICALITY>
          </CONTROL>
          <CONTROL>
            <ID>1048</ID>
            <STATEMENT><![CDATA[Status of the 'Shutdown: Clear virtual memory pagefile' setting]]></STATEMENT>
            <CRITICALITY>
              <LABEL><![CDATA[CRITICAL]]></LABEL>
              <VALUE>4</VALUE>
            </CRITICALITY>
          </CONTROL>
        </CONTROL_LIST>
      </POLICY>
    </POLICY_LIST>
    <GLOSSARY>
      <ASSET_GROUP_LIST>
        <ASSET_GROUP>
          <ID>6065</ID>
          <TITLE><![CDATA[Windows XP]]></TITLE>
        </ASSET_GROUP>
      </ASSET_GROUP_LIST>
      <ASSET_TAG_LIST>
        <TAG>
          <TAG_ID>7588415</TAG_ID>
          <TAG_NAME>windows XP</TAG_NAME>
        </TAG>
      </ASSET_TAG_LIST>
    </GLOSSARY>
  </RESPONSE>
</POLICY_LIST_OUTPUT>

DTD

<platform API server>/api/2.0/fo/compliance/policy/policy_list_output.dtd