Get all Agents for an Activation Key
Sample - Get all agents for an activation keySample - Get all agents for an activation key
API request
curl -u fo_username:password -X POST -H "X-Requested-With: curl" -H "Content-Type: text/xml" -H "Cache-Control: no-cache" --data-binary @list_agents_with_key.xml
"<qualys_base_url>/qps/rest/1.0/search/ca/agentactkey/"
Contents of list_agents_with_key.xml
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<filters>
<Criteria field="activationKey" operator="EQUALS">b9f9cca0-bc82-43a0-8bba-7e9913d1e386</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/1.0/ca/agentactkey.xsd">
<responseCode>SUCCESS</responseCode>
<count>1</count>
<hasMoreRecords>false</hasMoreRecords>
<data>
<AgentActKey>
<id>6201</id>
<activationKey>b9f9cca0-bc82-43a0-8bba-7e9913d1e386</activationKey>
<status>INACTIVE</status>
<countPurchased>10</countPurchased>
<countUsed>2</countUsed>
<datePurchased>2016-03-05T12:48:54Z</datePurchased>
<type>UNLIMITED</type>
<title>example key updated from api</title>
<isDisabled>false</isDisabled>
<modules>
<list/>
</modules>
<tags>
<list/>
</tags>
<agents>
<list>
<AgentAsset>
<id>710625</id>
<uuid>b0e9cca0-bc82-43a0-8bba-7e9913d1e386</uuid>
<name>10.10.10.10</name>
</AgentAsset>
<AgentAsset>
<id>703719</id>
<uuid>b1f9cca0-bc82-43a0-8bba-7e9913d1e386</uuid>
<name>192.168.1.1</name>
</AgentAsset>
</list>
</agents>
</AgentActKey>
</data>
</ServiceResponse>
XSD
<platform API server>/qps/xsd/1.0/ca/agentactkey.xsd