Scheduled Scan Management

post

/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": true
7
},
8
"startTime": {
9
"type":"string",
10
"required": true
11
},
12
"stopTime": {
13
"type":"string",
14
"required": false
15
},
16
"isRecurring": {
17
"type":"boolean",
18
"required": true
19
},
20
"nextOccurrence": {
21
"type":"string",
22
"required": false
23
},
24
"Recurrence": {
25
"type":["object", "null"],
26
"properties": {
27
"DayNumber": {
28
"type":"integer",
29
"required": true
30
},
31
"DuringWeekday": {
32
"type":"integer",
33
"required": true
34
},
35
"Month": {
36
"type":"integer",
37
"required": true
38
},
39
"WeekOfMonth": {
40
"type":"integer",
41
"required": true
42
},
43
"OccurrenceCount": {
44
"type":"integer",
45
"required": true
46
},
47
"End": {
48
"type":["string","null"],
49
"required": false
50
},
51
"Id": {
52
"type":"string",
53
"required": false
54
},
55
"Type": {
56
"type":"integer",
57
"required": true
58
},
59
"Repeat": {
60
"type":"integer",
61
"required": true
62
},
63
"Range": {
64
"type":"integer",
65
"required": true
66
},
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": true
10
},
11
"ScheduledScanStatus": {
12
"type":"integer",
13
"required": true
14
},
15
"StartTime": {
16
"type":"string",
17
"required": true
18
},
19
"StopTime": {
20
"type":["string", "null"],
21
"required": true
22
},
23
"NextOccurrence": {
24
"type":["string","null"],
25
"required": true
26
},
27
"LastOccurrence": {
28
"type":["string", "null"],
29
"required": true
30
},
31
"ConfigId": {
32
"type":"string",
33
"required": true
34
},
35
"IsRecurring": {
36
"type":"boolean",
37
"required": true
38
},
39
"Recurrence": {
40
"type":["object", "null"],
41
"properties": {
42
"Id": {
43
"type":"string",
44
"required": true
45
},
46
"End": {
47
"type":["string","null"],
48
"required": true
49
},
50
"Type": {
51
"type":"integer",
52
"required": true
53
},
54
"DuringWeekday": {
55
"type":"integer",
56
"required": true
57
},
58
"Repeat": {
59
"type":"integer",
60
"required": true
61
},
62
"DayNumber": {
63
"type":"integer",
64
"required": true
65
},
66
"WeekOfMonth": {
67
"type":"integer",
68
"required": true
69
},
70
"Month": {
71
"type":"integer",
72
"required": true
73
},
74
"OccurrenceCount": {
75
"type":"integer",
76
"required": true
77
},
78
"Range": {
79
"type":"integer",
80
"required": true
81
}
82
},
83
"required": true,
84
"additionalProperties": false
85
}
86
}
87
},
88
"IsSuccess": {
89
"type":"boolean",
90
"required": true
91
},
92
"ErrorMessage": {
93
"type":["string", "null"],
94
"required": true
95
},
96
"Reason": {
97
"type":["string", "null"],
98
"required": true
99
}
100
},
101
"additionalProperties": false
102
}
post

/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": true
7
},
8
"ErrorMessage": {
9
"type":["string", "null"],
10
"required": true
11
},
12
"Reason": {
13
"type":["string", "null"],
14
"required": true
15
}
16
},
17
"additionalProperties": false
18
}
get

/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": true
12
},
13
"ScheduledScanStatus": {
14
"type":"integer",
15
"required": true
16
},
17
"StartTime": {
18
"type":"string",
19
"required": true
20
},
21
"StopTime": {
22
"type":["string", "null"],
23
"required": true
24
},
25
"NextOccurrence": {
26
"type":["string","null"],
27
"required": true
28
},
29
"LastOccurrence": {
30
"type":["string", "null"],
31
"required": true
32
},
33
"ConfigId": {
34
"type":"string",
35
"required": true
36
},
37
"IsRecurring": {
38
"type":"boolean",
39
"required": true
40
},
41
"Recurrence": {
42
"type":["object", "null"],
43
"properties": {
44
"Id": {
45
"type":"string",
46
"required": true
47
},
48
"End": {
49
"type":["string","null"],
50
"required": true
51
},
52
"Type": {
53
"type":"integer",
54
"required": true
55
},
56
"DuringWeekday": {
57
"type":"integer",
58
"required": true
59
},
60
"Repeat": {
61
"type":"integer",
62
"required": true
63
},
64
"DayNumber": {
65
"type":"integer",
66
"required": true
67
},
68
"WeekOfMonth": {
69
"type":"integer",
70
"required": true
71
},
72
"Month": {
73
"type":"integer",
74
"required": true
75
},
76
"OccurrenceCount": {
77
"type":"integer",
78
"required": true
79
},
80
"Range": {
81
"type":"integer",
82
"required": true
83
}
84
},
85
"required": true,
86
"additionalProperties": false
87
}
88
}
89
},
90
"IsSuccess": {
91
"type":"boolean",
92
"required": true
93
},
94
"ErrorMessage": {
95
"type":["string", "null"],
96
"required": true
97
},
98
"Reason": {
99
"type":["string", "null"],
100
"required": true
101
}
102
},
103
"additionalProperties": false
104
}