List Last ‘N’ Scan References for a Schedule

GETapi/2.0/fo/scan/schedules/runhistory/?action=list

Provides a list of the most recent "N" scan references associated with a particular schedule ID, allowing you to monitor and track automated scans initiated for that schedule.

Note: This API does not work for MAP schedule scan ids.

Input ParametersInput Parameters

Parameter

Required/Optional

Data Type

Description

action=list

Required

String 

Specify action to list last N scan references for a schedule.

schedule_scan_ids

Required

Integer 

Specify schedule ids in a comma-separated list.

Maximum 500 schedule ids are supported.

output_format

Optional

File 

Specify output file format. Default value is “xml” format.

Supported values are “xml” & “json”.

schedule_executions_count

Optional

Integer 

Specify a schedule execution count. You can specify a value form 1 to 50. When not specified, 3 is taken as the default.

Sample - List the Last 'N' Scan References for the Given Schedule IDsSample - List the Last 'N' Scan References for the Given Schedule IDs

API Request

curl --location 'platform_API_server/api/2.0/fo/scan/schedules/runhistory/?action=list&output_format=xml&schedule_executions_count=4&schedule_scan_ids=99446%2C85403%2C144180%2C144181%2C6666%2C657657%2C125485' \--header 'X-Requested-With: test' \--header 'Authorization: Basic token'

XML Output

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SCHEDULES_RUN_HISTORY SYSTEM "<platform_API_server>/api/2.0/fo/scan/schedules/runhistory/output.dtd
">
<SCHEDULES_RUN_HISTORY>
   <RESPONSE>
      <DATETIME>2023-01-09T14:57:51Z</DATETIME>
      <SCHEDULE_LIST>
         <SCHEDULE id="85403">
            
<SCHEDULE_ID>85403</SCHEDULE_ID>
            
<SCHEDULE_RUN_HISTORY>
               <SCHEDULE_RUN>
                  
<SCAN_LAUNCH_INFO>
                     
<SCAN_ID>99408</SCAN_ID>
                     
<SCAN_REFERENCE>scan/1634824016.99408</SCAN_REFERENCE>
                     
<LAUNCH_DATETIME>2021-10-21
13:46:56</LAUNCH_DATETIME>
                     
<TITLE>test9090</TITLE>
                     
<TARGET>10.20.30.40</TARGET>
                     
<STATUS>FINISHED</STATUS>
                     
<DURATION>86 Seconds</DURATION>
                     
<NBHOST>0</NBHOST>
                     
<SUBSCRIPTION_ID>237630</SUBSCRIPTION_ID>
                     
<OPTION_PROFILE_TITLE>Initial
Options</OPTION_PROFILE_TITLE>
                     
<IS_PROCESSED>1</IS_PROCESSED>
                  
</SCAN_LAUNCH_INFO>
</SCHEDULE_RUN>
</SCHEDULE_RUN_HISTORY>
 </SCHEDULE>
<SCHEDULE id="99446">
            
<SCHEDULE_ID>99446</SCHEDULE_ID>
<SCHEDULE_RUN_HISTORY>
<SCHEDULE_RUN>
                  
<SCAN_LAUNCH_INFO>
                     
<SCAN_ID>99561</SCAN_ID>
                     
<SCAN_REFERENCE>scan/1635442781.99561</SCAN_REFERENCE>
                     
<LAUNCH_DATETIME>2021-10-28
17:39:41</LAUNCH_DATETIME>
                     
<TITLE>test_555</TITLE>
                     
<TARGET>list of target ips</TARGET>
                     
<STATUS>FINISHED</STATUS>
                     
<DURATION>434 Seconds</DURATION>
                     
<NBHOST>0</NBHOST>
                     
<SUBSCRIPTION_ID>237630</SUBSCRIPTION_ID>
                     
<OPTION_PROFILE_TITLE>Initial
Options</OPTION_PROFILE_TITLE>
                     
<IS_PROCESSED>1</IS_PROCESSED>
                  
</SCAN_LAUNCH_INFO>
</SCHEDULE_RUN>
<SCHEDULE_RUN>
                  
<SCAN_LAUNCH_INFO>
                     
<SCAN_ID>99554</SCAN_ID>
                     
<SCAN_REFERENCE>scan/1635431408.99554</SCAN_REFERENCE>
                     
<LAUNCH_DATETIME>2021-10-28
14:30:08</LAUNCH_DATETIME>
                     
<TITLE>test_898</TITLE>
                     
<TARGET>10.20.30.40</TARGET>
                     
<STATUS>FINISHED</STATUS>
                     
<DURATION>9 Seconds</DURATION>
                     
<NBHOST>0</NBHOST>
                     
<SUBSCRIPTION_ID>237630</SUBSCRIPTION_ID>
                     
<OPTION_PROFILE_TITLE>Initial
Options</OPTION_PROFILE_TITLE>
                     
<IS_PROCESSED>1</IS_PROCESSED>
                  
</SCAN_LAUNCH_INFO>
</SCHEDULE_RUN>
<SCHEDULE_RUN>                 
<SCAN_LAUNCH_INFO>
                     
<SCAN_ID>99553</SCAN_ID>                
<SCAN_REFERENCE>scan/1635431408.99553</SCAN_REFERENCE>
                     
<LAUNCH_DATETIME>2021-10-28
14:30:08</LAUNCH_DATETIME>
                     
<TITLE>test9090</TITLE>
                     
<TARGET>10.20.30.40</TARGET>
                     
<STATUS>FINISHED</STATUS>
                     
<DURATION>79 Seconds</DURATION>
                     
<NBHOST>0</NBHOST>
                     
<SUBSCRIPTION_ID>237630</SUBSCRIPTION_ID>
                     
<OPTION_PROFILE_TITLE>Initial
Options</OPTION_PROFILE_TITLE>
                     
<IS_PROCESSED>1</IS_PROCESSED>
                  
</SCAN_LAUNCH_INFO>
               </SCHEDULE_RUN>
          </SCHEDULE_RUN_HISTORY>
         </SCHEDULE>
      </SCHEDULE_LIST>
   </RESPONSE>
</SCHEDULES_RUN_HISTORY>

DTD

<platform API server>/api/2.0/fo/scan/schedules/runhistory/output.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.