Blackout Operations

get

/AppSpiderEnterprise/rest/v1/Blackout/GetBlackouts

Description Retrieves the blackout list for the client

Parameters No parameters

Response Messages

Response status code

Reason

Description

200

Response contains the list of blackouts

Response example:

JSON schema:
1
{
2
"type": "object",
3
"properties": {
4
"Blackouts": {
5
"type":"array",
6
"items": {
7
"type":"object",
8
"properties": {
9
"Id": {
10
"type":"string",
11
"required": true
12
},
13
"Name": {
14
"type":"string",
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
"TargetHost": {
34
"type":"string",
35
"required": true
36
},
37
"IsRecurring": {
38
"type": "boolean",
39
"required": true
40
},
41
"ClientId": {
42
"type":"string",
43
"required": true
44
},
45
"Recurrence": {
46
"type":["string", "null"],
47
"properties": {
48
"Id": {
49
"type":"string",
50
"required": true
51
},
52
"End": {
53
"type": ["string", "null"],
54
"required": true
55
},
56
"Type": {
57
"type":"integer",
58
"required": true
59
},
60
"DduringWeekday": {
61
"type":"integer",
62
"required": true
63
},
64
"Repeat": {
65
"type": "integer",
66
"required": true
67
},
68
"DayNumber": {
69
"type": "integer",
70
"required": true
71
},
72
"WeekOfMonth": {
73
"type":"integer"
74
"required": true
75
},
76
"Month": {
77
"type":"integer",
78
"required": true
79
},
80
"OccurrenceCount": {
81
"type":"integer",
82
"reuired": true
83
},
84
"Range": {
85
"type":"integer",
86
"required": true
87
}
88
},
89
"required": true,
90
"additionalProperties": false
91
}
92
},
93
"additionalProperties": false
94
}
95
},
96
"IsSuccess": {
97
"type":"boolean",
98
"required": true
99
},
100
"ErrorMessage": {
101
"type":["string","null"],
102
"required": true
103
},
104
"Reason": {
105
"type":["string","null"],
106
"required": true
107
}
108
},
109
"additionalProperties": false
110
}
111
post

/AppSpiderEnterprise/rest/v1/Blackout/SaveBlackout

Description Creates or updates a blackout window

Parameters

Name

Type

Required

Description

id

guid[]

N

Blackout id. Update blackout if id provided and create new blackout if not provided

name

string

Y

Blackout name. Name should be unique in the client

startTime

DateTime

Y

Date and time the blackout starts

stopTime

DateTime

N

Date and time the blackout ends

targetHost

string

Y

Name of host for the blackout

isRecurring

bool

N(false)

Marks the blackout as a reoccurring event

recurrence

Recurrence object

N

Sets the recurrence frequency. See the section "Recurrences Explained" for more detail.

Response Messages

Response status code

Reason

Description

200

Response contains the list of blackouts

400

InvalidJsonSchema

Required parameters not provided

400

InvalidArguments

Data provided is not consistent

400

NameIsNotUnique

Blackout name is not unique in the client

Response example:

JSON schema:
1
{
2
"type": "object",
3
"properties": {
4
"Blackouts": {
5
"type":"array",
6
"items": {
7
"type":"object",
8
"properties": {
9
"Id": {
10
"type":"string",
11
"required": true
12
},
13
"Name": {
14
"type":"string",
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
"TargetHost": {
34
"type":"string",
35
"required": true
36
},
37
"IsRecurring": {
38
"type": "boolean",
39
"required": true
40
},
41
"ClientId": {
42
"type":"string",
43
"required": true
44
},
45
"Recurrence": {
46
"type":["string", "null"],
47
"properties": {
48
"Id": {
49
"type":"string",
50
"required": true
51
},
52
"End": {
53
"type": ["string", "null"],
54
"required": true
55
},
56
"Type": {
57
"type":"integer",
58
"required": true
59
},
60
"DduringWeekday": {
61
"type":"integer",
62
"required": true
63
},
64
"Repeat": {
65
"type": "integer",
66
"required": true
67
},
68
"DayNumber": {
69
"type": "integer",
70
"required": true
71
},
72
"WeekOfMonth": {
73
"type":"integer"
74
"required": true
75
},
76
"Month": {
77
"type":"integer",
78
"required": true
79
},
80
"OccurrenceCount": {
81
"type":"integer",
82
"reuired": true
83
},
84
"Range": {
85
"type":"integer",
86
"required": true
87
}
88
},
89
"required": true,
90
"additionalProperties": false
91
}
92
},
93
"additionalProperties": false
94
}
95
},
96
"IsSuccess": {
97
"type":"boolean",
98
"required": true
99
},
100
"ErrorMessage": {
101
"type":["string","null"],
102
"required": true
103
},
104
"Reason": {
105
"type":["string","null"],
106
"required": true
107
}
108
},
109
"additionalProperties": false
110
}
post

/AppSpiderEnterprise/rest/v1/Blackout/DeleteBlackouts

Description Removes a blackout window

Parameters

Name

Type

Required

Description

blackoutIds

guid[]

Y

Blackout IDs

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
}