Launch report using asset tags

It’s possible to select asset tags for both vulnerability and compliance reports. Use the following tag parameters to launch your report using asset tags.

Input Parameters

Parameter

Description

use_tags={0|1}

(Optional) Specify "1" when your report target will include asset tags. Specify “0” (the default) when your report target will include IP addresses/ranges and/or asset groups. When not specified, use_tags=0 is used.

tag_include_selector={all|any}

(Optional) Select "any" (the default) to include hosts that match at least one of the selected tags. Select "all" to include hosts that match all of the selected tags.

tag_include_selector is valid only when use_tags=1 is specified.

tag_exclude_selector={all|any}

(Optional) Select "any" (the default) to exclude hosts that match at least one of the selected tags. Select "all" to exclude hosts that match all of the selected tags.

tag_exclude_selector is valid only when use_tags=1 is specified.

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.

tag_set_by is valid only when use_tags=1 is specified.

tag_set_include={value}

(Optional) Specify a tag set to include. Hosts that match these tags will be included. You identify the tag set by providing tag name or IDs. Multiple entries are comma separated.

tag_set_include is valid only when use_tags=1 is specified.

tag_set_exclude={value}

(Optional) Specify a tag set to exclude. Hosts that match these tags will be excluded. You identify the tag set by providing tag name or IDs. Multiple entries are comma separated.

tag_set_exclude is valid only when use_tags=1 is specified.

Sample - Launch report using asset tags

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST" -d "action=launch&template_id=55469&report_title=My+Windows+Report&output_format=pdf&use_tags=1&tag_set_by=name&tag_set_include=Windows" "https://qualysapi.qualys.com/api/2.0/fo/report/"

<?xml version="1.0" encoding="UTF-8" ?>

XML output

<!DOCTYPE GENERIC SYSTEM "https://qualysapi.qualys.com/api/2.0/simple_return.dtd">

<SIMPLE_RETURN>

    <RESPONSE>

        <DATETIME>2018-02-20T21:45:23Z</DATETIME>

        <TEXT>New report launched</TEXT>

        <ITEM_LIST>

            <ITEM>

                <KEY>ID</KEY>

                <VALUE>1665</VALUE>

            </ITEM>

        </ITEM_LIST>

    </RESPONSE>

</SIMPLE_RETURN>