Get all Agents for the Account

[POST] /qps/rest/2.0/search/am/hostasset

Sample - Get all agents for the accountSample - Get all agents for the account

API request

curl -u "USERNAME:PASSWORD" -X "POST" -H "Content-Type: text/xml"  -H "Cache-Control: no-cache" --data-binary @list_all_agents.xml
"<qualys_base_url>/qps/rest/2.0/search/am/hostasset/"      
    

Contents of list_all_agents.xml

<ServiceRequest>
    <filters>
        <Criteria field="tagName" operator="EQUALS">Cloud Agent</Criteria>
    </filters>
</ServiceRequest>      
    

Response

<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/qps/xsd/2.0/am/asset.xsd">
    <responseCode>SUCCESS</responseCode>
    <count>4</count>
    <hasMoreRecords>false</hasMoreRecords>
    <data>
        <Asset>
            <id>712038</id>
            <name>192.168.1.12</name>
            <created>2016-06-18T16:54:50Z</created>
            <modified>2016-06-18T16:54:51Z</modified>
            <type>HOST</type>
            <tags>
                <list>
                    <TagSimple>
                        <id>509525</id>
                        <name>Cloud Agent</name>
                    </TagSimple>
                </list>
            </tags>
            <sourceInfo>
                <list>
                    <AssetSource/>
                </list>
            </sourceInfo>
        </Asset>
        <Asset>
            <id>2532638</id>
            <name>10.40.2.176</name>
            <created>2017-04-17T13:32:48Z</created>
            <modified>2017-05-14T14:06:03Z</modified>
            <type>HOST</type>
            <tags>
                <list>
                    <TagSimple>
                        <id>509525</id>
                        <name>Cloud Agent</name>
                    </TagSimple>
                </list>
            </tags>
            <sourceInfo>
                <list>
                    <AssetSource/>
                </list>
            </sourceInfo>
        </Asset>
        ...
    
    </data>
</ServiceResponse>      
    

XSD

<platform API server>/qps/xsd/2.0/am/asset.xsd