Static Search List

/api/2.0/fo/qid/search_list/static/

List static search lists and manage them (create, update, delete).

Permissions - Managers, Unit Managers, Scanners and Readers have permission to list and manage static search lists.

Actions: List | Create and Update | Delete

List Static Search Lists

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=list

Required

String

Supported methods are GET, POST

echo_request={0|1}

Optional

Integer

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

ids={id1,id2,...}

Optional

Integer

One or more search list IDs to display. Multiple IDs are comma separated.

Sample - List Static Search ListsSample - List Static Search Lists

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl""https://<qualys_base_url>/api/2.0/fo/qid/search_list/static/?action=list&ids=381"
--header 'X-Requested-With: curl' \ --header 'Authorization: Basic '

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE STATIC_SEARCH_LIST_OUTPUT SYSTEM "https://<qualys_base_url>/api/2.0/fo/qid/search_list/static/static_list_output.dtd">
<STATIC_SEARCH_LIST_OUTPUT>
  <RESPONSE>
    <DATETIME>2015-01-06T06:20:03Z</DATETIME>
    <STATIC_LISTS>
      <STATIC_LIST>
        <ID>381</ID>
        <TITLE><![CDATA[static search list]]></TITLE>
        <GLOBAL>Yes</GLOBAL>
        <OWNER>acme_tb</OWNER>
        <CREATED><![CDATA[04/27/2018 at 15:18:42 (GMT+0530)]]></CREATED>
        <MODIFIED_BY>acme_tb</MODIFIED_BY>
        <MODIFIED><![CDATA[04/27/2018 at 15:18:42 (GMT+0530)]]></MODIFIED>
        <QIDS>
          <QID>1000<QID>
          <QID>1001<QID>
        </QIDS>
        <!-- This list is used in the following option profiles //-->
        <OPTION_PROFILES>
            <OPTION_PROFILE>
                <ID>135<ID>
                <TITLE><![CDATA[Initial Options]]></TITLE>
            <OPTION_PROFILE>
        </OPTION_PROFILES>
        <!-- This list is used in the following report templates //-->
        <REPORT_TEMPLATES>
            <REPORT_TEMPLATE>
                <ID>256<ID>
                <TITLE><![CDATA[Scan Report Template]]></TITLE>
            <REPORT_TEMPLATE>
        </REPORT_TEMPLATES>
        <!-- This list is used in the following remediation policies. //-->
        <REMEDIATION_POLICIES>
            <REMEDIATION_POLICY>
                <ID>655<ID>
                <TITLE><![CDATA[Remediation Policy 1]]></TITLE>
            <REMEDIATION_POLICY>
        </REMEDIATION_POLICIES>
        <!-- This search list is associated with following distribution groups. //-->
        <DISTRIBUTION_GROUPS>
            <DISTRIBUTION_GROUP>              
                <NAME><![CDATA[All]]></NAME>
            <DISTRIBUTION_GROUP>
        </DISTRIBUTION_GROUPS>
        <COMMENTS><![CDATA[This is my first comment for this list]]></COMMENTS>
      </STATIC_LIST>
   </STATIC_LISTS>
  </RESPONSE>
</SEARCH_LIST_OUTPUT>

DTD for Static Search ListDTD for Static Search List

<platform API server>/api/2.0/fo/qid/search_list/static/static_list_output.dtd

Create / Update Static Search List

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=create|update

Required

String

Supported method is POST

echo_request={0|1}

Optional

Integer

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

title={value}

Required for create action, optional for update action

String

A user defined search list title. Maximum is 256 characters (ascii).

qids=(num1, num2...}

Required for create action

Integer

QIDs to include in the search list. Ranges are allowed.

add_qids=(num1, num2...}

Optional for update action

Integer

QIDs/ranges you want to add to the existing ones defined for the search list. When the same QIDs are passed using add_qids and remove_qids in the same request, the QIDs are added to the list.

add_qids cannot be specified with qids in the same request.

remove_qids=(num1, num2...}

Optional for update action

Integer

QIDs/ranges you want to remove the existing ones defined for the search list. When the same QIDs are passed using add_qids and remove_qids in the same request, the QIDs are added to the list.

remove_qids cannot be specified with qids in the same request.

global={0|1}

Optional

Integer

Specify 1 to make this a global search list. By default a new search list is not set to global (i.e. set to 0).

comments={value}

Optional

String

User defined comments.

Sample - Create New Static Search ListSample - Create New Static Search List

API Request

curl -u "USERNAME:PASSWD" -H "X-Requested-With: Curl" -X "POST" -d"action=create&title=My+Static+Search+List&qids=68518-68522,48000""https://<qualys_base_url>/api/2.0/fo/qid/search_list/static/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
  <RESPONSE>
    <DATETIME>2018-03-01T21:32:40Z</DATETIME>
    <TEXT>New search list created successfully</TEXT>
    <ITEM_LIST>
      <ITEM>
        <KEY>ID</KEY>
        <VALUE>136992</VALUE>
      </ITEM>      
    </ITEM_LIST>
  </RESPONSE>
</SIMPLE_RETURN>

Sample - Update Static Search ListSample - Update Static Search List

API Request

curl -u "USERNAME:PASSWD" -H "X-Requested-With: Curl" -X "POST" -d "action=update&id=136992&global=1&qids=68518-68522,48000-48004" "https://<qualys_base_url>/api/2.0/fo/qid/search_list/static/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM 
"https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
 <RESPONSE>
 <DATETIME>2015-09-01T21:32:40Z</DATETIME>
 <TEXT>Search list updated successfully</TEXT>
 <ITEM_LIST>
    <ITEM>
        <KEY>ID</KEY>
        <VALUE>136992</VALUE>
        </ITEM>
        </ITEM_LIST>
        </RESPONSE>
       </SIMPLE_RETURN>

Delete Static Search List

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=delete

Required

String

Supported method is POST

echo_request={0|1}

Optional

Integer

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

id={id}

Required

Integer

The ID of the search list you want to delete.

Sample - Delete Static Search ListSample - Delete Static Search List

API Request

curl -u "USERNAME:PASSWD" -H "X-Requested-With: Curl" -X "POST" -d"action=delete&id=136992""https://<qualys_base_url>/api/2.0/fo/qid/search_list/static/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
  <RESPONSE>
    <DATETIME>2018-05-01T21:32:40Z</DATETIME>
    <TEXT>search list deleted successfully</TEXT>
    <ITEM_LIST>
      <ITEM>
        <KEY>ID</KEY>
        <VALUE>136992</VALUE>
      </ITEM>
    </ITEM_LIST>
  </RESPONSE>
</SIMPLE_RETURN>

DTD for Static Search List (Create, Update, Delete)DTD for Static Search List (Create, Update, Delete)

<platform API server>/api/2.0/simple_return.dtd