List Asset Groups

GET POST/api/2.0/fo/asset/group/?action=list

List asset groups in the user's account.

Click here to see the required permissions.

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=list

Required

String 

The GET or POST method may be used.

output_format={csv|xml}

Optional

File 

The requested output format: CSV or XML (the default).

echo_request={0|1}

Optional

Integer

Specify 1 to show (echo) the request’s input parameters (names, values) in the XML output. When unspecified, parameters are not included in the XML output.

ids={value}

Optional

Integer 

Show only asset groups with certain IDs. Multiple IDs are comma separated.

id_min={value}

Optional

Integer 

Show only asset groups that have an ID greater than or equal to the specified ID.

id_max={value}

Optional

Integer 

Show only asset groups that have an ID less than or equal to the specified ID.

truncation_limit={value}}

Optional

Integer 

Specify the maximum number of asset group records to output. By default this is set to 1000 records. If you specify truncation_limit=0, the output is not paginated and all records are returned in a single output. WARNING This can generate very large output and processing large XML files can consume a lot of resources on the client side. It is recommended to use the pagination logic and parallel processing. The previous page can be processed while the next page is being downloaded.

network_ids={value}

Optional and valid only when the Networks feature is enabled in your account

Integer 

Restrict the request to certain network IDs. Multiple IDs are comma separated.

unit_id={value}

Optional

Integer 

Show only asset groups that have a business unit ID equal to the specified ID.

user_id={value}

Optional

Integer 

Show only asset groups that have a user ID equal to the specified ID.

title={value}

Optional

String 

Show only the asset group that has a title equal to the specified string - this must be an exact match.

show_attributes={value}

Optional

String/
Integer 

Show attributes for each asset group along with the ID. Specify ALL or a comm-separated list of attribute names. Attribute names: ID, TITLE, OWNER_USER_NAME, OWNER_USER_ID, OWNER_UNIT_ID, NETWORK_IDS, LAST_UPDATE, IP_SET, APPLIANCE_LIST, DOMAIN_LIST, DNS_LIST, NETBIOS_LIST, EC2_ID_LIST, HOST_IDS, ASSIGNED_USER_IDS, ASSIGNED_UNIT_IDS, BUSINESS_IMPACT, CVSS, COMMENTS.

Sample - List Asset Groups, Show Default AttributesSample - List Asset Groups, Show Default Attributes

API Request

curl -u "USERNAME:PASSWD" -H "X-Requested-With: Curl" -X "POST" -d"action=list&ids=442838""https://<qualys_base_url>/api/2.0/fo/asset/group/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ASSET_GROUP_LIST_OUTPUT SYSTEM "https://<qualys_base_url>/api/2.0/fo/asset/group/asset_group_list_output.dtd">
<ASSET_GROUP_LIST_OUTPUT>
  <RESPONSE>
    <DATETIME>2018-05-17T08:48:41Z</DATETIME>
    <ASSET_GROUP_LIST>
      <ASSET_GROUP>
        <ID>442838</ID>
        <TITLE><![CDATA[All]]></TITLE>
        <OWNER_ID>103448</OWNER_ID>
        <UNIT_ID>0</UNIT_ID>
        <NETWORK_ID>0</NETWORK_ID>
        <IP_SET>
          <IP_RANGE>10.10.10.0-10.10.10.1</IP_RANGE>
          <IP_RANGE>10.10.10.3-10.10.10.6</IP_RANGE>
          <IP>10.10.10.14</IP>
          <IP_RANGE>10.10.10.16-10.10.10.20</IP_RANGE>
          <IP_RANGE>10.10.10.22-10.10.10.255</IP_RANGE>
          <IP>10.10.31.26</IP>
        </IP_SET>
      </ASSET_GROUP>
    </ASSET_GROUP_LIST>
  </RESPONSE>
</ASSET_GROUP_LIST_OUTPUT>

Sample - List Asset Groups, Show All AttributesSample - List Asset Groups, Show All Attributes

API Request

curl -u "USERNAME:PASSWD" -H "X-Requested-With: Curl" -X "POST" -d"action=list&amp;ids=442838""https://<qualys_base_url>/api/2.0/fo/asset/group/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ASSET_GROUP_LIST_OUTPUT SYSTEM "https://<qualys_base_url>/api/2.0/fo/asset/group/asset_group_list_output.dtd">
<ASSET_GROUP_LIST_OUTPUT>
  <RESPONSE>
    <DATETIME>2018-03-17T09:08:01Z</DATETIME>
    <ASSET_GROUP_LIST>
      <ASSET_GROUP>
        <ID>634851</ID>
        <TITLE><![CDATA[mp1]]></TITLE>
        <OWNER_ID>70953</OWNER_ID>
        <UNIT_ID>0</UNIT_ID>
        <LAST_UPDATE>2018-03-13T11:44:04Z</LAST_UPDATE>
        <BUSINESS_IMPACT>High</BUSINESS_IMPACT>
        <CVSS_ENVIRO_CDP>Not Defined</CVSS_ENVIRO_CDP>
        <CVSS_ENVIRO_TD>Not Defined</CVSS_ENVIRO_TD>
        <CVSS_ENVIRO_CR>Not Defined</CVSS_ENVIRO_CR>
        <CVSS_ENVIRO_IR>Not Defined</CVSS_ENVIRO_IR>
        <CVSS_ENVIRO_AR>Not Defined</CVSS_ENVIRO_AR>
        <COMMENTS>
            <![CDATA[comment]]>
        </COMMENTS>
        <DEFAULT_APPLIANCE_ID>43575</DEFAULT_APPLIANCE_ID>
        <APPLIANCE_IDS>43576, 43575</APPLIANCE_IDS>
        <DOMAIN_LIST>
          <DOMAIN netblock="10.10.10.0, 10.10.25.50">ad.lan</DOMAIN>
        </DOMAIN_LIST>
        <NETBIOS_LIST>
          <NETBIOS>WIN2003-SRV-O</NETBIOS>
        </NETBIOS_LIST>
      </ASSET_GROUP>
    </ASSET_GROUP_LIST>
  </RESPONSE>
</ASSET_GROUP_LIST_OUTPUT>

DTD

<platform API server>/api/2.0/fo/asset/group/asset_group_list_output.dtd