Update scanner appliance

/api/2.0/fo/appliance/?action=update

/api/2.0/fo/appliance/physical/?action=update

[POST]

Use these APIs to update a virtual scanner appliance in the user's account. You can add tags, remove and reset tags for your scanner appliances.

Manage VLANs | Manage Static Routes

Input Parameters

Parameter

Description

action=update

(Required)

echo_request={0|1}

(Optional) Specify 1 to view (echo) input parameters in the XML output. By default these are not included.

id={id}

(Required) A valid ID of a virtual scanner.

name={string}

(Optional) The friendly name. This name can’t already be assigned to an appliance in your account.  It can be a maximum of 15 characters, spaces are not allowed.

polling_interval={value}

(Optional) The polling interval, in seconds. A valid value is 60 to 3600 (we recommend 180 which is the default). This is the frequency that the virtual scanner will attempt to connect to our Cloud Security Platform. The appliance calls home to provide health updates/heartbeats to the platform, to get software updates from the platform, to learn if new scan jobs have been requested by users, and to upload scan results data to the platform, if applicable.

comment={value}

(Optional) User-defined comments.

set_tags= {value}

(Optional) Specify tag to be assigned to the scanner appliance. Both virtual and physical scanners can be tagged.

These parameters are mutually exclusive and cannot be specified in the same request: set_tags and add_tags, remove_tags.

add_tags= {value}

(Optional) Specify tag to be added to the existing list of tags assigned to the scanner. Multiple entries are comma separated.

These parameters are mutually exclusive and cannot be specified in the same request: set_tags and add_tags, remove_tags.

remove_tags= {value}

(Optional) Specify tag to be removed from the existing list of tags assigned to scanner. Multiple tags are comma separated.

These parameters are mutually exclusive and cannot be specified in the same request: set_tags and add_tags, remove_tags.

tag_set_by= {id|name}

(Optional) Specify "id" (the default) to select a tag set by providing tag IDs. Specify “name” to select a tag set by providing tag names.

enable_ipv6=0

Enable or disable IPv6 on LAN. Specify 1 to enable IPv6 and 0 to disable it.

 

Sample - Update the friendly name

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST"

-d "action=update&echo_request=1&id=12345&name=scanner15"

"https://qualysapi.qualys.com/api/2.0/fo/appliance/"

XML output

<?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-05-03T12:12:45Z</DATETIME>

        <TEXT>Virtual scanner updated successfully</TEXT>

        <ITEM_LIST>

            <ITEM>

                <KEY>ID</KEY>

                <VALUE>17110</VALUE>

            </ITEM>

        </ITEM_LIST>

    </RESPONSE>

</SIMPLE_RETURN>

Sample - Add and remove tags

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -X POST -d

"action=update&id=3105&tag_set_by=name&add_tags=windows_agent&remove_tags=linux_agents"

"https://qualysapi.qualys.com/api/2.0/fo/appliance/"

 

XML output

<?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-05-11T19:44:35Z</DATETIME>

    <TEXT>Virtual scanner updated successfully</TEXT>

    <ITEM_LIST>

      <ITEM>

        <KEY>ID</KEY>

        <VALUE>3105</VALUE>

      </ITEM>

    </ITEM_LIST>

  </RESPONSE>

</SIMPLE_RETURN>

Sample - Assign tags

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: curl" -X POST -d "action=update&id=3112&tag_set_by=name&set_tags=local_host,local_IP"  "https://qualysapi.qualys.com/api/2.0/fo/appliance/"

 

Sample - Update physical scanner, add comment

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST"

-d "action=update&id=5115&comment=Hello"

"https://qualysapi.qualys.com/api/2.0/fo/appliance/physical/"

Sample - Parameters tag_set_by,  add_tags

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST" -d "action=update&id=5115&tag_set_by=id&add_tags=7691422" "https://qualysapi.qualys.com/api/2.0/fo/appliance/physical/"

Sample - Parameters tag_set_by, set_tags

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST" -d "action=update&id=5115&tag_set_by=id&set_tags=7691422" "https://qualysapi.qualys.com/api/2.0/fo/appliance/physical/"

DTD

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