Change Activation Key
Change the activation key for single or multiple agents.
Permission required - Managers with full scope. Other users must have these permissions: Access Permission “API Access” and CA Activation Key Permission "Change Activation Key”.
Input ParametersInput Parameters
Use the following <ServiceRequest> parameter to assign a new activation key to your asset.
Parameter |
Description |
---|---|
newActivationKey (String) | (required) (Mandatory) The new activation key to which you want to migrate your assets. |
Filter operators are available for use with <ServiceRequest> parameters. You can use the following filters with <ServiceRequest> parameters to search the assets to which the new activation key is to be assigned.
Parameter |
Description |
---|---|
id (Long) | Asset ID of your agents. Supported operators: EQUALS, IN, NOT EQUALS, GREATER, LESSER |
tagName String) | Asset tag name assigned to the agent host. You can search for agents using the tag name assigned to the agent host. Supported operators: CONTAINS, EQUALS, NOT EQUALS |
activationKey (String) | Existing activation key used while installing the Cloud Agent. You can search for agents using the activation key. Supported operator: EQUALS |
You must include at least one filter in the API request body as a search criterion.
Sample - Change Activation Key using Single FilterSample - Change Activation Key using Single Filter
Refer to the following sample to change the activation key of an Agent using a single filter.
API Request
curl -X POST -H "X-Requested-With: curl" -H "Authorization: Basic AbcdAbcdAbcdAbcdAbcdAbcdAb" -H "Content-Type: application/xml" -H "CacheControl: no-cache "<qualys_bas_url>/qps/rest/1.0/cak/ca/changeactkey"
Request POST data
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<ChangeActKey>
<newActivationKey>abc123d4-a123-12ab-a1b2-ab123c45d67e</newActivationKey>
</ChangeActKey>
</data>
<filters>
<Criteria field="id" operator="IN">12345678</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/changeactkey.xsd">
<responseCode>SUCCESS</responseCode>
<data>
<string>Change Activation Key request has been submitted successfully; With Total Submitted Asset Count:1</string>
</data>
</ServiceResponse>
Sample - Activation Key Change for Multiple Agents using the tagName FilterSample - Activation Key Change for Multiple Agents using the tagName Filter
Refer to the following sample to change the activation key of a Cloud Agent using a single filter.
API Request
curl -X POST -H "X-Requested-With: curl" -H "Authorization: Basic AbcdAbcdAbcdAbcdAbcdAbcdAb" -H "Content-Type: application/xml" -H "CacheControl: no-cache "<qualys_bas_url>/qps/rest/1.0/cak/ca/changeactkey"
Request POST Data
<?xml version="1.0" encoding="UTF-8" ?>
<ServiceRequest>
<data>
<ChangeActKey>
<newActivationKey>abc123d4-a123-12ab-a1b2-ab123c45d67e</newActivationKey>
</ChangeActKey>
</data>
<filters>
<Criteria field="tagName"
operator="EQUALS">gentoo</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/changeact
key.xsd">
<responseCode>SUCCESS</responseCode>
<data>
<string>Change Activation Key request has been submitted successfully; With Total Submitted Asset Count:7</string>
</data>
</ServiceResponse>
XSD
<platform API server>/qps/xsd/1.0/ca/changeactkey.xsd