Assign a scanner appliance to a network. When the network support feature is enabled for your subscription, scanner appliances are assigned to networks. Each appliance can be assigned to 1 network only.
Permissions - This API is available to Managers only.
Parameter |
Required/Optional |
Data Type |
Description |
---|---|---|---|
action=assign_network_id |
Required | String |
Specify action=assign_network_id to assign scanner appliance to a network. |
appliance_id={value} |
Required | Integer |
ID of the scanner appliance you want to assign to a network. |
network_id={value} |
Required | Integer |
ID of the network you want to assign the scanner appliance to. |
API Request
curl -k -u "USERNAME:PASSWORD" -H "X-Requested-With: test" -d action=assign_network_id&appliance_id=506&network_id=1002" "https://<qualys_base_url>/api/2.0/fo/appliance/"
XML Output
The response will look like this, if successful:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2018-03-16T22:50:49Z</DATETIME>
<TEXT>Success: Network ID=[1103] assigned to Appliance with
ID=[506]</TEXT>
</RESPONSE>
</SIMPLE_RETURN>
Or, if unsuccessful, the response might look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
<RESPONSE>
<DATETIME>2018-03-16T22:53:41Z</DATETIME>
<CODE>1905</CODE>
<TEXT>parameter network_id has invalid value: 1103 (No such network ID)
</TEXT>
</RESPONSE>
</SIMPLE_RETURN>
<platform API server>/api/2.0/simple_return.dtd