Create a new blackout
post
https://EM_HOST:EM_CONSOLE_HTTPS_PORT/em/api/blackouts
This API creates a new blackout.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : schema
Type:
object
Payload to create a new blackout.
Show Source
-
description: string
Blackout related comments.Example:
A regular maintenance scheduled blackouts for oemrep database.
-
excludeTargets: array
excludeTargets
List of indirect blackout members which should be excluded from blackout.
-
excludeTypes: array
excludeTypes
List of indirect blackout member type names which should be excluded from blackout.
-
isAllowJobs: boolean
Default Value:
false
Indicate of jobs on targets are still allowed to be executed. -
isFullBlackoutOnHost: boolean
Default Value:
false
Indicate that all targets on host are under blackout. -
name(required): string
Name of the blackout
-
reasonId: number
reason id for the blackout
-
targets(required): array
targets
List of targets to be blacked out.
-
type: string
Default Value:
PATCHING
Allowed Values:[ "PATCHING", "NOTIFICATION", "NOTIFICATION_MAINTENANCE" ]
Type of the blackout.
Match All
Payload to create a new blackout.
Show Source
Nested Schema : excludeTargets
Type:
array
List of indirect blackout members which should be excluded from blackout.
Show Source
-
Array of:
object TargetIdentifier
Identifies a target either by name and typeName or by id.
Nested Schema : excludeTypes
Type:
array
List of indirect blackout member type names which should be excluded from blackout.
Show Source
Nested Schema : targets
Type:
array
List of targets to be blacked out.
Show Source
-
Array of:
object BlackoutTarget
Representation of a target contained in a blackout.
Nested Schema : Schedule
Type:
object
This represents a schedule object to schedule blackouts.
Show Source
-
repeat: object
Repeat
Describes repetition of a blackout.
-
timeToStart: string
Start time of the blackout with timezone. Timestamps are with minute accuracy. Timezones can be given as offset (+01:00) or as zone (Europe/Berlin).Example:
2023-08-24T14:54-02:00
Match One Schema
Show Source
Nested Schema : TargetIdentifier
Type:
object
Identifies a target either by name and typeName or by id.
Show Source
-
id: string
Target ID
-
name: string
Target Name
-
typeName: string
Target Type Name
Nested Schema : BlackoutTarget
Type:
object
Representation of a target contained in a blackout.
Show Source
-
id: string
target id
-
isIncludeMembers: boolean
Default Value:
true
Indicates if members of the target should be included in the blackout. -
name: string
Target Name
-
typeName: string
Target Type Name
Nested Schema : Repeat
Type:
object
Describes repetition of a blackout.
Show Source
-
timeToEndRepeat: string
End time of the repetition with timezone. Timestamps are with minute accuracy.Example:
2023-08-24T14:54-02:00
Match One Schema
Show Source
-
object
DaysOfYear
List of days of year.
-
object
DaysOfMonth
List of days of month in range 1-31 or -1 for last day of the month.
-
object
DaysOfWeek
List of days of week.
-
object
EveryNWeeks
Repeat every n weeks.
-
object
EveryNDays
Repeat every n days.
-
object
EveryNHours
Repeat every n hours.
-
object
EveryNMinutes
Repeat every n minutes, minimal value is 2.
Nested Schema : TimeToEnd
Type:
object
An object specifying an end time with timezone. Timestamps are with minute accuracy. Timezones can be given as offset (+01:00) or as zone (Europe/Berlin).
Show Source
-
timeToEnd(required): string
An end timeExample:
2023-08-23T14:54+01:00
Nested Schema : Duration
Type:
object
A duration given in hours and minutes. At least one of durationHours and durationMinutes is required.
Show Source
-
durationHours: integer
Duration of the blackout in hours.Example:
2
-
durationMinutes: integer
Duration of the blackout in minutes.Example:
25
Nested Schema : DaysOfYear
Type:
object
List of days of year.
Show Source
-
daysOfYear: array
daysOfYear
List of days of the year.
Nested Schema : DaysOfMonth
Type:
object
List of days of month in range 1-31 or -1 for last day of the month.
Show Source
-
daysOfMonth: array
daysOfMonth
List of days of the month (1 based).
Nested Schema : DaysOfWeek
Type:
object
List of days of week.
Show Source
-
daysOfWeek: array
daysOfWeek
List of days of week (localized short names).
Nested Schema : EveryNWeeks
Type:
object
Repeat every n weeks.
Show Source
-
everyNWeeks: integer
Repeat interval in weeks.Example:
2
Nested Schema : EveryNDays
Type:
object
Repeat every n days.
Show Source
-
everyNDays: integer
Repeat interval in days, minimal value is 1.Example:
5
Nested Schema : EveryNHours
Type:
object
Repeat every n hours.
Show Source
-
everyNHours: integer
Repeat interval in hours.Example:
2
Nested Schema : EveryNMinutes
Type:
object
Repeat every n minutes, minimal value is 2.
Show Source
-
everyNMinutes: integer
Repeat interval in minutes.Example:
45
Nested Schema : items
Type:
Show Source
object
-
day: integer
Day in range 1-31 or -1 for last day of the month.
-
month: integer
Month in range of 1-12.
Nested Schema : daysOfMonth
Type:
array
List of days of the month (1 based).
Show Source
Example:
[
"1",
"15"
]
Nested Schema : daysOfWeek
Type:
array
List of days of week (localized short names).
Show Source
-
Array of:
string
Allowed Values:
[ "MO", "TU", "WE", "TH", "FR", "SA", "SU" ]
Example:
[
"MO",
"TH"
]
Examples
Back to Top
Response
Supported Media Types
- application/json
201 Response
Created
Root Schema : Blackout
Type:
object
This is a blackout description.
Show Source
-
agent: string
Name of the agent starting the blackout.Example:
hostName:1838
-
creationTimeToEnd: string
The timeToEnd given at blackout creation time.
-
creationTimeToStart: string
The timeToStart given at blackout creation time.
-
description: string
Blackout related comments.Example:
A regular maintenance scheduled blackouts for oemrep database
-
excludeTargets: array
excludeTargets
List of indirect blackout members which should be excluded from blackout.
-
excludeTypes: array
excludeTypes
List of indirect blackout member type names which should be excluded from blackout.
-
id(required): string
Blackout IDExample:
D91786E288D35455C3ADA1B329B49BB5
-
isAllowJobs: boolean
Default Value:
false
Indicates if job executions on targets are allowed during blackout. -
isFullBlackoutOnHost: boolean
Default Value:
false
Indicates if all targets on hosts in the blackout are blacked out too. -
links(required): object
links
Blackout related links.
-
name(required): string
Blackout NameExample:
my_blackout
-
owner(required): string
Owner of the blackoutExample:
scott
-
reason: string
Blackout reasonExample:
Host patching
-
status(required): string
Allowed Values:
[ "SCHEDULED", "START_PROCESSING", "START_PARTIAL", "START_FAILED", "STARTED", "STOP_PENDING", "STOP_FAILED", "STOP_PARTIAL", "EDIT_FAILED", "EDIT_PARTIAL", "EDIT_PENDING", "STOPPED", "ENDED", "END_PARTIAL" ]
Blackout status. -
type(required): string
Default Value:
PATCHING
Allowed Values:[ "PATCHING", "NOTIFICATION", "NOTIFICATION_MAINTENANCE" ]
Type of the blackout.
Match All
This is a blackout description.
Show Source
Nested Schema : excludeTargets
Type:
array
List of indirect blackout members which should be excluded from blackout.
Show Source
-
Array of:
object TargetIdentifier
Identifies a target either by name and typeName or by id.
Nested Schema : excludeTypes
Type:
array
List of indirect blackout member type names which should be excluded from blackout.
Show Source
Nested Schema : Schedule
Type:
object
This represents a schedule object to schedule blackouts.
Show Source
-
repeat: object
Repeat
Describes repetition of a blackout.
-
timeToStart: string
Start time of the blackout with timezone. Timestamps are with minute accuracy. Timezones can be given as offset (+01:00) or as zone (Europe/Berlin).Example:
2023-08-24T14:54-02:00
Match One Schema
Show Source
Nested Schema : TargetIdentifier
Type:
object
Identifies a target either by name and typeName or by id.
Show Source
-
id: string
Target ID
-
name: string
Target Name
-
typeName: string
Target Type Name
Nested Schema : Repeat
Type:
object
Describes repetition of a blackout.
Show Source
-
timeToEndRepeat: string
End time of the repetition with timezone. Timestamps are with minute accuracy.Example:
2023-08-24T14:54-02:00
Match One Schema
Show Source
-
object
DaysOfYear
List of days of year.
-
object
DaysOfMonth
List of days of month in range 1-31 or -1 for last day of the month.
-
object
DaysOfWeek
List of days of week.
-
object
EveryNWeeks
Repeat every n weeks.
-
object
EveryNDays
Repeat every n days.
-
object
EveryNHours
Repeat every n hours.
-
object
EveryNMinutes
Repeat every n minutes, minimal value is 2.
Nested Schema : TimeToEnd
Type:
object
An object specifying an end time with timezone. Timestamps are with minute accuracy. Timezones can be given as offset (+01:00) or as zone (Europe/Berlin).
Show Source
-
timeToEnd(required): string
An end timeExample:
2023-08-23T14:54+01:00
Nested Schema : Duration
Type:
object
A duration given in hours and minutes. At least one of durationHours and durationMinutes is required.
Show Source
-
durationHours: integer
Duration of the blackout in hours.Example:
2
-
durationMinutes: integer
Duration of the blackout in minutes.Example:
25
Nested Schema : DaysOfYear
Type:
object
List of days of year.
Show Source
-
daysOfYear: array
daysOfYear
List of days of the year.
Nested Schema : DaysOfMonth
Type:
object
List of days of month in range 1-31 or -1 for last day of the month.
Show Source
-
daysOfMonth: array
daysOfMonth
List of days of the month (1 based).
Nested Schema : DaysOfWeek
Type:
object
List of days of week.
Show Source
-
daysOfWeek: array
daysOfWeek
List of days of week (localized short names).
Nested Schema : EveryNWeeks
Type:
object
Repeat every n weeks.
Show Source
-
everyNWeeks: integer
Repeat interval in weeks.Example:
2
Nested Schema : EveryNDays
Type:
object
Repeat every n days.
Show Source
-
everyNDays: integer
Repeat interval in days, minimal value is 1.Example:
5
Nested Schema : EveryNHours
Type:
object
Repeat every n hours.
Show Source
-
everyNHours: integer
Repeat interval in hours.Example:
2
Nested Schema : EveryNMinutes
Type:
object
Repeat every n minutes, minimal value is 2.
Show Source
-
everyNMinutes: integer
Repeat interval in minutes.Example:
45
Nested Schema : items
Type:
Show Source
object
-
day: integer
Day in range 1-31 or -1 for last day of the month.
-
month: integer
Month in range of 1-12.
Nested Schema : daysOfMonth
Type:
array
List of days of the month (1 based).
Show Source
Example:
[
"1",
"15"
]
Nested Schema : daysOfWeek
Type:
array
List of days of week (localized short names).
Show Source
-
Array of:
string
Allowed Values:
[ "MO", "TU", "WE", "TH", "FR", "SA", "SU" ]
Example:
[
"MO",
"TH"
]
Examples
400 Response
One of the given parameters is invalid.
Root Schema : ErrorResponse
Type:
object
Response sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument
-
message: string
A descriptive error message.Example:
argument given is not supported
401 Response
Client is not authenticated.
Root Schema : ErrorResponse
Type:
object
Response sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument
-
message: string
A descriptive error message.Example:
argument given is not supported
409 Response
Not authorized or resource already exists.
Root Schema : ErrorResponse
Type:
object
Response sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument
-
message: string
A descriptive error message.Example:
argument given is not supported
500 Response
Internal error serving the request.
Root Schema : ErrorResponse
Type:
object
Response sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument
-
message: string
A descriptive error message.Example:
argument given is not supported
503 Response
Indicates that a required service is not available.
Root Schema : ErrorResponse
Type:
object
Response sent back in the case of an error.
Show Source
-
code: string
Status code of the error.Example:
IllegalArgument
-
message: string
A descriptive error message.Example:
argument given is not supported