Search Activation Keys
Returns details on activation keys in the user’s account.
Pagination - A maximum of 100 activation keys are returned by default. To customize this specify a “preferences” tag in the POST body of your request. Learn more about pagination
Limit your results - Use the optional “fields” parameter to limit the amount of information returned. Learn more about limiting your results
Permissions required - Managers with full scope. Other users must have these permissions: Access Permission “API Access” and CA Activation Key Permission “View Activation Key”.
Input ParametersInput Parameters
Use the following <ServiceRequest> parameters to filter the list. Filter operators are available for use with <ServiceRequest> parameters.
Parameter |
Mandatory /Optional |
Data Type |
Description |
---|---|---|---|
countPurchased |
Optional if type is COUNT_LIMITED or COUNT_TIME_LIMITED | integer |
Search for keys with number of keys purchased. Value is 1 or more. |
activationKey |
Optional |
string |
Search for agents using a certain key. |
id |
Optional |
integer |
Search for keys with a certain key ID. |
isDisabled |
Optional |
boolean |
Set to true to search for disabled keys. By default is set to false. |
Sample - Search activation keysSample - Search activation keys
API request
curl -u username:password -X POST -H "X-Requested-With: curl" -H "Content-Type: text/xml" -H "Cache-Control: no-cache" --data-binary @get_all_keys.xml
"<qualys_base_url>/qps/rest/1.0/search/ca/agentactkey/"
Note: “get_all_keys.xml” contains the request POST data.
Contents of get_all_keys.xml
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest></ServiceRequest>
Response
<?xml version="1.0" encoding="UTF-8"?>
<ServiceResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="<qualys_base_url>/portal-api/xsd/1.0/ca/agentactkey.xsd">
<responseCode>SUCCESS</responseCode>
<count>9</count>
<hasMoreRecords>false</hasMoreRecords>
<data>
<AgentActKey>
<id>4689401</id>
<activationKey>64849169-2d44-4e65-af90-07a499f9c54f</activationKey>
<status>ACTIVE</status>
<countPurchased>0</countPurchased>
<countUsed>6</countUsed>
<datePurchased>2021-08-27T08:07:06Z</datePurchased>
<type>UNLIMITED</type>
<networkId>0</networkId>
<isDisabled>false</isDisabled>
<applyOnAgents>true</applyOnAgents>
<modules>
<list>
<ActivationKeyModule>
<license>PC_LICENSE</license>
</ActivationKeyModule>
</list>
</modules>
<tags>
<list>
<Tag>
<id>16802774</id>
<name>Tag02</name>
</Tag>
</list>
</tags>
<agentCount>6</agentCount>
<suspendSelfPatch>false</suspendSelfPatch>
</AgentActKey>
<AgentActKey>
<id>4899401</id>
<activationKey>e4c270a0-bc67-4311-81f3-eaeb256c749f</activationKey>
<status>ACTIVE</status>
<countPurchased>0</countPurchased>
<countUsed>2</countUsed>
<datePurchased>2021-10-26T11:45:50Z</datePurchased>
<type>UNLIMITED</type>
<title>Test Key IBM_updat</title>
<networkId>0</networkId>
<isDisabled>false</isDisabled>
<applyOnAgents>true</applyOnAgents>
<modules>
<list>
<ActivationKeyModule>
<license>PM</license>
</ActivationKeyModule>
<ActivationKeyModule>
<license>VM_LICENSE</license>
</ActivationKeyModule>
</list>
</modules>
<agentCount>2</agentCount>
<suspendSelfPatch>false</suspendSelfPatch>
</AgentActKey>
</data>
</ServiceResponse>
XSD
<platform API server>/qps/xsd/1.0/ca/agentactkey.xsd