List virtual hosts in the user's account. By default, all virtual hosts in the user's account are included.
Permissions - Managers view virtual hosts in the subscription. Unit Managers view virtual hosts in their own business unit. Scanners and Readers view virtual hosts in their own account.
Parameter |
Required/Optional |
Data Type |
Description |
---|---|---|---|
action=list |
Required | String |
Specify action=list to list virtual hosts |
echo_request={0|1} |
Optional | Integer |
Specify 1 to view (echo) input parameters in the XML output. By default these are not included. |
ip={value} |
Optional | Integer |
Show only virtual hosts that have a certain IP address. |
port={value} |
Optional | Integer |
Show only virtual hosts that have a certain port. |
API Request
curl -u "USERNAME:PASSWORD" -H "X-Requested-With:curl" -X POST "https://<qualys_base_url>/api/2.0/fo/asset/vhost/?action=list"
XML Output
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE VIRTUAL_HOST_LIST_OUTPUT SYSTEM "https://<qualys_base_url>/api/2.0/fo/asset/vhost/vhost_list_output.dtd">
<VIRTUAL_HOST_LIST_OUTPUT>
<RESPONSE>
<DATETIME>2018-04-26T11:20:42Z</DATETIME>
<VIRTUAL_HOST_LIST>
<VIRTUAL_HOST>
<IP>10.11.65.3</IP>
<PORT>255</PORT>
<FQDN>asadfsadf-123.com</FQDN>
</VIRTUAL_HOST>
<VIRTUAL_HOST>
<IP>10.11.65.5</IP>
<PORT>246</PORT>
<FQDN>asdfsahydk.com</FQDN>
</VIRTUAL_HOST>
</VIRTUAL_HOST_LIST>
</RESPONSE>
</VIRTUAL_HOST_LIST_OUTPUT>
<platform API server>/api/2.0/fo/asset/vhost/vhost_list_output.dtd