Edit an existing blackout
patch
https://EM_HOST:EM_CONSOLE_HTTPS_PORT/em/api/blackouts/{blackoutId}
This API edits an existing blackout.
Request
Path Parameters
-
blackoutId(required): string
blackout id
Supported Media Types
- application/json
Root Schema : schema
Type:
object
Payload to edit an existing 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. -
reasonId: number
reason id for the blackout
-
targets: 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
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
Schedule details
Show Source
-
isTargetZone: boolean
To indicate if the time should be interpreted in the target timezone or not. If timezone is specified in time and isTargetZone is true, it will be reported as an ERROR condition
-
recurring: string
Frequency at which the operation must be executed repeatedlyExample:
frequency:weekly;days:2,
-
scheduleType: string
Currently we support ICAL specification default is ICAL, in the future it can be extended to other types e.g CRON.
-
startGracePeriodInMinutes: integer
Time in minutes after which the job will be marked as skipped if not started. Null or Negative value means no grace period.Example:
60
-
timeToEnd: string
(date-time)
End time
-
timeToStart: string
(date-time)
Start time
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
Examples
Back to Top
Response
Supported Media Types
- application/json
200 Response
OK
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
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
Schedule details
Show Source
-
isTargetZone: boolean
To indicate if the time should be interpreted in the target timezone or not. If timezone is specified in time and isTargetZone is true, it will be reported as an ERROR condition
-
recurring: string
Frequency at which the operation must be executed repeatedlyExample:
frequency:weekly;days:2,
-
scheduleType: string
Currently we support ICAL specification default is ICAL, in the future it can be extended to other types e.g CRON.
-
startGracePeriodInMinutes: integer
Time in minutes after which the job will be marked as skipped if not started. Null or Negative value means no grace period.Example:
60
-
timeToEnd: string
(date-time)
End time
-
timeToStart: string
(date-time)
Start time
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 : Link
Type:
object
Represents a link(could be self, previous or next)
Show Source
-
href: string
URL for LinkExample:
/em/api/<resources>?page=b2Zmc2V0OjA&limit=0
Examples
401 Response
client is not authenticated
Root Schema : ErrorResponse
Type:
object
Error response
Show Source
-
code(required): string
A short error code that defines the error, meant for programmatic parsing
-
message(required): string
A human-readable error string
404 Response
target not found or not authorized
Root Schema : ErrorResponse
Type:
object
Error response
Show Source
-
code(required): string
A short error code that defines the error, meant for programmatic parsing
-
message(required): string
A human-readable error string
500 Response
internal error serving the request
Root Schema : ErrorResponse
Type:
object
Error response
Show Source
-
code(required): string
A short error code that defines the error, meant for programmatic parsing
-
message(required): string
A human-readable error string
503 Response
indicates that a required service is not available.
Root Schema : ErrorResponse
Type:
object
Error response
Show Source
-
code(required): string
A short error code that defines the error, meant for programmatic parsing
-
message(required): string
A human-readable error string