Create Scan Schedule

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

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

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=create

Required

String 

Specify to  create scan schedule.

echo_request={0|1}

Optional

Integer 

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

fqdn={value}

Optional

Integer 

(VM scan only) The target FQDN for a vulnerability scan. You must specify at least one target i.e. IPs, asset groups or FQDNs. Multiple values are comma separated.

{scan parameters}

 

 

Click here to view scan parameters

{scan schedule parameters}

 

 

Click here to view scan schedule parameters

Sample - Create Scan ScheduleSample - 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://<qualys_base_url>/api/2.0/fo/schedule/scan/?action=create"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/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 MinutesSample - 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://<qualys_base_url>/api/2.0/fo/schedule/scan/"

XML Output

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM "https://<qualys_base_url>/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 Using all Scanners in NetworkSample - Create Scan Schedule Using all Scanners in Network

API Request

curl -u "USERNAME:PASSWD" -H "X-Requested-With:curl demo 2" -d "action=create&scan_title=API+Schedule+scan&option_title=Initial+O ptions&ip_network_id=12807913&scanners_in_network=1&ip=10.10.10.10 ,10.10.10.11&occurrence=monthly&frequency_months=12&day_of_month=2 0&start_minute=00&start_hour=22&time_zone_code=IN&observe_dst=no&p ause_after_hours=3&resume_in_days=4&recurrence=5&start_date=08/20/ 2016&active=1" "https://<qualys_base_url>/api/2.0/fo/schedule/scan/"

XML Output

?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SIMPLE_RETURN SYSTEM 
"https://<qualys_base_url>/api/2.0/simple_return.dtd">
<SIMPLE_RETURN>
 <RESPONSE>
 <DATETIME>2018-04-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 (With FQDN and Asset Group)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://<qualys_base_url>/api/2.0/fo/schedule/scan/"

DTD

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


 

 

Was this topic helpful?

success Thank you! We're glad to hear that this topic was useful.
success We appreciate your feedback. We'll work to make this topic better for you in the future.