Scheduled Scan Management
/AppSpiderEnterprise/rest/v1/ScanSchedule/ScheduleScan
Description Schedules a scan
Request Body
Name | Type | Required | Description |
---|---|---|---|
configId | guid[] | Y | Scan config ID |
startTime | DateTime | Y | Scan start time (UTC) |
stopTime | DateTime | N | Scan stop time (UTC) |
isRecurring | boolean | Y | Scan is recurring |
nextOurrence | DateTime | Y if IsRecurring is false. N if IsRecurring is true | Next ocurrence of scan |
recurrence | Recurrence object | N | Recurrence object. For more information see Recurrences Explained |
Request example:
JSON schema:
1{2"type":"object",3"properties": {4"configId": {5"type":"string",6"required": true7},8"startTime": {9"type":"string",10"required": true11},12"stopTime": {13"type":"string",14"required": false15},16"isRecurring": {17"type":"boolean",18"required": true19},20"nextOccurrence": {21"type":"string",22"required": false23},24"Recurrence": {25"type":["object", "null"],26"properties": {27"DayNumber": {28"type":"integer",29"required": true30},31"DuringWeekday": {32"type":"integer",33"required": true34},35"Month": {36"type":"integer",37"required": true38},39"WeekOfMonth": {40"type":"integer",41"required": true42},43"OccurrenceCount": {44"type":"integer",45"required": true46},47"End": {48"type":["string","null"],49"required": false50},51"Id": {52"type":"string",53"required": false54},55"Type": {56"type":"integer",57"required": true58},59"Repeat": {60"type":"integer",61"required": true62},63"Range": {64"type":"integer",65"required": true66},67}68}69},70}
Response Messages
Response status code | Reason | Description |
---|---|---|
200 | Scan config removed | |
400 | InvalidJsonSchema | Required parameters not provided |
400 | InvalidArguments | Scan config with 'configId' doesn't exist in client. Scan config targets are not approved for user. Stop time must be greater than start date/time. Start time must be greater than current user time. IsRecurring is set to true(scan is recurring) but recurrence object is not provided. |
Response example:
JSON schema:
1{2"type":"object",3"properties": {4"ScanSchedule": {5"type":["object", "null"],6"properties": {7"Id": {8"type":"string",9"required": true10},11"ScheduledScanStatus": {12"type":"integer",13"required": true14},15"StartTime": {16"type":"string",17"required": true18},19"StopTime": {20"type":["string", "null"],21"required": true22},23"NextOccurrence": {24"type":["string","null"],25"required": true26},27"LastOccurrence": {28"type":["string", "null"],29"required": true30},31"ConfigId": {32"type":"string",33"required": true34},35"IsRecurring": {36"type":"boolean",37"required": true38},39"Recurrence": {40"type":["object", "null"],41"properties": {42"Id": {43"type":"string",44"required": true45},46"End": {47"type":["string","null"],48"required": true49},50"Type": {51"type":"integer",52"required": true53},54"DuringWeekday": {55"type":"integer",56"required": true57},58"Repeat": {59"type":"integer",60"required": true61},62"DayNumber": {63"type":"integer",64"required": true65},66"WeekOfMonth": {67"type":"integer",68"required": true69},70"Month": {71"type":"integer",72"required": true73},74"OccurrenceCount": {75"type":"integer",76"required": true77},78"Range": {79"type":"integer",80"required": true81}82},83"required": true,84"additionalProperties": false85}86}87},88"IsSuccess": {89"type":"boolean",90"required": true91},92"ErrorMessage": {93"type":["string", "null"],94"required": true95},96"Reason": {97"type":["string", "null"],98"required": true99}100},101"additionalProperties": false102}
/AppSpiderEnterprise/rest/v1/ScanSchedule/DeleteScanSchedules
Description Deletes a scheduled scan from the client
Parameters
Name | Type | Required | Description |
---|---|---|---|
scheduleIds | guid[] | Y | Scheduled scan IDs |
Response Messages
Response status code | Reason | Description |
---|---|---|
200 | Scheduled scan removed | |
400 | InvalidJsonSchema | Required parameters not provided |
Response example:
JSON schema:
1{2"type":"object",3"properties": {4"IsSuccess": {5"type":"boolean",6"required": true7},8"ErrorMessage": {9"type":["string", "null"],10"required": true11},12"Reason": {13"type":["string", "null"],14"required": true15}16},17"additionalProperties": false18}
/AppSpiderEnterprise/rest/v1/ScanSchedule/GetScanSchedules
Description Retrieves scheduled scan list for the client
Parameters No parameters
Response Messages
Response status code | Reason | Description |
---|---|---|
200 | Response contains the list of scheduled scans |
Response example:
JSON schema:
1{2"type":"object",3"properties": {4"ScanSchedules": {5"type":"array",6"items": {7"type":"object",8"properties": {9"Id": {10"type":"string",11"required": true12},13"ScheduledScanStatus": {14"type":"integer",15"required": true16},17"StartTime": {18"type":"string",19"required": true20},21"StopTime": {22"type":["string", "null"],23"required": true24},25"NextOccurrence": {26"type":["string","null"],27"required": true28},29"LastOccurrence": {30"type":["string", "null"],31"required": true32},33"ConfigId": {34"type":"string",35"required": true36},37"IsRecurring": {38"type":"boolean",39"required": true40},41"Recurrence": {42"type":["object", "null"],43"properties": {44"Id": {45"type":"string",46"required": true47},48"End": {49"type":["string","null"],50"required": true51},52"Type": {53"type":"integer",54"required": true55},56"DuringWeekday": {57"type":"integer",58"required": true59},60"Repeat": {61"type":"integer",62"required": true63},64"DayNumber": {65"type":"integer",66"required": true67},68"WeekOfMonth": {69"type":"integer",70"required": true71},72"Month": {73"type":"integer",74"required": true75},76"OccurrenceCount": {77"type":"integer",78"required": true79},80"Range": {81"type":"integer",82"required": true83}84},85"required": true,86"additionalProperties": false87}88}89},90"IsSuccess": {91"type":"boolean",92"required": true93},94"ErrorMessage": {95"type":["string", "null"],96"required": true97},98"Reason": {99"type":["string", "null"],100"required": true101}102},103"additionalProperties": false104}