Replace Scanner Appliance

POST/api/2.0/fo/appliance/replace_iscanner

Using the Replace Scanner Appliance API , Managers and Unit Managers can replace a scanner appliance with a new one. Tell us the name of the appliance you want to replace and the one you want to use.

Good to Know
- You can replace one scanner appliance at a time.
- Do not replace a scanner appliance while scans (using the appliance) are in progress. - The old scanner and the new scanner must be in the same network, if applicable.
- You can only replace an EC2 scanner with another EC2 scanner

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=replace

Required

String 

Specify action to replace scanner appliance.

echo_request={0|1}

Optional

Integer 

Specifies whether to echo the request’s input parameters (names and values) in the XML output. When not specified, parameters are not included in the XML output. Specify 1 to view parameters in the XML output.

old_scanner_name={value}

Required

String 

The name of the scanner you want to replace.

new_scanner_name={value}

Required

String 

The name of the scanner you want to use.

do_not_copy_settings={0|1}

Optional

Integer 

When not specified, we will transfer settings from the old scanner to the new scanner for you. Specify 1 if you do not want us to transfer appliance settings. Settings include the polling interval, heartbeat checks, scanning options, VLANs and static routes, associated asset groups, schedules and network, if applicable. 

do_not_remove_new_scann er_from_objects={0|1}

Optional

Integer 

When not specified, we will remove the new appliance from business objects (asset groups and schedules) that it’s already associated with. Specify 1 if you do not want us to remove the new appliance from business objects. This parameter cannot be set for EC2 scanners.

Sample - Replace scanner with new oneSample - Replace scanner with new one

Replace “scanner1” with “scanner2” and copy scanner appliance settings but do not remove the new scanner from business objects.

API Request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl""https://<qualys_base_url>/api/2.0/fo/appliance/replace_iscanner/?action=replace&echo_request=1&old_scanner_name=scanner1&new_scanner_name=scanner2&do_not_copy_settings=0&do_not_remove_new_scanner_from_objects=1"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SCANNER_REPLACE_OUTPUT SYSTEM 
"https://<qualys_base_url>/api/2.0/fo/appliance/replace_iscanne
r/replace_iscanner_output.dtd">
<SCANNER_REPLACE_OUTPUT>
 <REQUEST>
 <DATETIME>2018-01-16T06:52:53Z</DATETIME>
 <USER_LOGIN>abcd</USER_LOGIN>
 
<RESOURCE>https://<qualys_base_url>/api/2.0/fo/appliance/replac
e_iscanner/</RESOURCE>
 <PARAM_LIST>
 <PARAM>
 <KEY>echo_request</KEY>
 <VALUE>1</VALUE>
 </PARAM>
 <PARAM>
 <KEY>old_scanner_name</KEY>
 <VALUE>scanner1</VALUE>
 </PARAM>
 <PARAM>
 <KEY>new_scanner_name</KEY>
 <VALUE>scanner2</VALUE>
 </PARAM>
 <PARAM>
 <KEY>do_not_copy_settings</KEY>
 <VALUE>0</VALUE>
 </PARAM>
 <PARAM>
 <KEY>do_not_remove_new_scanner_from_objects</KEY>
 <VALUE>1</VALUE>
 </PARAM>
 <PARAM>
 <KEY>action</KEY>
 <VALUE>replace</VALUE>
 </PARAM>
 </PARAM_LIST>
 </REQUEST>
 <RESPONSE>
 <DATETIME>2018-01-16T06:52:53Z</DATETIME>
 <NEW_SETTINGS>POLLING_INTERVAL: 180, HEARTBEAT: 
1</NEW_SETTINGS>
 <SCHEDULED_SCANS>Scheduled-Scan1, Scheduled-Scan2</SCHEDULED_SCANS>
 <ASSET_GROUPS>AG123, AG456</ASSET_GROUPS>
 <SUCCESS>Scanner Appliance replaced successfully.</SUCCESS>
</RESPONSE>
</SCANNER_REPLACE_OUTPUT>

DTD

<platform API server>/api/2.0/fo/appliance/replace_iscanner/replace_iscanner_output.dtd