Create scan schedule

/api/2.0/fo/schedule/scan/?action=create

[POST]

Create a new scan schedule in the user's account.

Input Parameters

Parameter

Description

action=create

(Required)

echo_request={0|1}

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

{scan parameters}

Click here to view scan parameters

{scan schedule parameters}

Click here to view scan schedule parameters

Sample - Create scan schedule

API request

curl -u "USERNAME:PASSWD" -H "X-Requested-With: curl" -X "POST" -d "scan_title=My+Scan+Schedule&active=1&option_id=3456&target_from=tags&tag_set_include=tag1,tag2,tag3&iscanner_name=scanner1&occurrence=daily&frequency_days=5&time_zone_code=US-CA&observe_dst=yes&start_hour=14&start_minute=0"

"https://qualysapi.qualys.com/api/2.0/fo/schedule/scan/?action=create"

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-12-20T21:32:40Z</DATETIME>

    <TEXT>New scan scheduled successfully</TEXT>

    <ITEM_LIST>

      <ITEM>

        <KEY>ID</KEY>

        <VALUE>136992</VALUE>

      </ITEM>      

    </ITEM_LIST>

  </RESPONSE>

</SIMPLE_RETURN>

Sample - Create Scan Schedule, Cancel after 45 minutes

API request

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

"action=create&scan_title=My_Weekly_Scan&option_title=InitialOptions&ip=10.20.31.73,10.20.31.106&active=1&occurrence=weekly&start_hour=13&start_minute=30&time_zone_code=IN&frequency_weeks=1&weekdays=Sunday&end_after=0&end_after_mins=45&iscanner_name=scanner1,scanner2&before_notify=1&before_notify_unit=hours&before_notify_time=20&recipient_group_ids=4228,5628" "https://qualysapi.qualys.com/api/2.0/fo/schedule/scan/"

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>2019-01-09T21:32:40Z</DATETIME>

    <TEXT>New scan scheduled successfully</TEXT>

    <ITEM_LIST>

      <ITEM>

        <KEY>ID</KEY>

        <VALUE>136992</VALUE>

      </ITEM>      

    </ITEM_LIST>

  </RESPONSE>

</SIMPLE_RETURN>

Sample - Create scan schedule (with FQDN and asset group)

API request

curl -u "USERNAME:PASSWORD" -H "X-Requested-With: Curl" -X "POST" -d "action=create&scan_title=My+Schedule&active=1&time_zone_code=US-OR&start_hour=18&start_minute=50&occurrence=daily&option_title=Initial+Options&frequency_days=1&asset_groups=My+AG&fqdn=domain.qualys.com"

"https://qualysapi.qualys.com/api/2.0/fo/schedule/scan/"

DTD

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