Assign Scanner Appliance to Network

/api/2.0/fo/network/?action=assign_network_id

[POST]

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.

Input Parameters

Parameter

Description

action=assign_network_id

(Required)

appliance_id={value}

(Required) ID of the scanner appliance you want to assign to a network.

network_id={value}

(Required) ID of the network you want to assign the scanner appliance to.

Sample - Assign scanner appliance to network

API request

curl -k -u "USERNAME:PASSWORD" -H "X-Requested-With: test" -d action=assign_network_id&appliance_id=506&network_id=1002" "https://qualysapi.qualys.com/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://qualysapi.qualys.com/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://qualysapi.qualys.com/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>

DTD

<platform API server>/api/2.0/simple_return.dtd