Blackout Operations
/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": true12},13"Name": {14"type":"string",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"TargetHost": {34"type":"string",35"required": true36},37"IsRecurring": {38"type": "boolean",39"required": true40},41"ClientId": {42"type":"string",43"required": true44},45"Recurrence": {46"type":["string", "null"],47"properties": {48"Id": {49"type":"string",50"required": true51},52"End": {53"type": ["string", "null"],54"required": true55},56"Type": {57"type":"integer",58"required": true59},60"DduringWeekday": {61"type":"integer",62"required": true63},64"Repeat": {65"type": "integer",66"required": true67},68"DayNumber": {69"type": "integer",70"required": true71},72"WeekOfMonth": {73"type":"integer"74"required": true75},76"Month": {77"type":"integer",78"required": true79},80"OccurrenceCount": {81"type":"integer",82"reuired": true83},84"Range": {85"type":"integer",86"required": true87}88},89"required": true,90"additionalProperties": false91}92},93"additionalProperties": false94}95},96"IsSuccess": {97"type":"boolean",98"required": true99},100"ErrorMessage": {101"type":["string","null"],102"required": true103},104"Reason": {105"type":["string","null"],106"required": true107}108},109"additionalProperties": false110}111
/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": true12},13"Name": {14"type":"string",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"TargetHost": {34"type":"string",35"required": true36},37"IsRecurring": {38"type": "boolean",39"required": true40},41"ClientId": {42"type":"string",43"required": true44},45"Recurrence": {46"type":["string", "null"],47"properties": {48"Id": {49"type":"string",50"required": true51},52"End": {53"type": ["string", "null"],54"required": true55},56"Type": {57"type":"integer",58"required": true59},60"DduringWeekday": {61"type":"integer",62"required": true63},64"Repeat": {65"type": "integer",66"required": true67},68"DayNumber": {69"type": "integer",70"required": true71},72"WeekOfMonth": {73"type":"integer"74"required": true75},76"Month": {77"type":"integer",78"required": true79},80"OccurrenceCount": {81"type":"integer",82"reuired": true83},84"Range": {85"type":"integer",86"required": true87}88},89"required": true,90"additionalProperties": false91}92},93"additionalProperties": false94}95},96"IsSuccess": {97"type":"boolean",98"required": true99},100"ErrorMessage": {101"type":["string","null"],102"required": true103},104"Reason": {105"type":["string","null"],106"required": true107}108},109"additionalProperties": false110}
/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": true7},8"ErrorMessage": {9"type":["string", "null"],10"required": true11},12"Reason": {13"type":["string", "null"],14"required": true15}16},17"additionalProperties": false18}