Update an alert
Base URL
https://{kibana_url}
Auth
Deprecated
Deprecated in 7.13.0. Use the update rule API instead.
Expand all
space_id
string
optional
An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.
alertId
string
required
The identifier for the alert.
Example:
41893910-6bca-11eb-9e0d-85d233e3ee35
Cross-site request forgery protection
{
}
actions
object []
+
Show 4 properties
actionTypeId
string
required
The identifier for the action type.
group
string
required
Grouping actions is recommended for escalations for different types of alert instances. If you don't need this functionality, set it to default.
id
string
required
The ID of the action saved object.
params
object
required
The map to the params that the action type will receive. params are handled as Mustache templates and passed a default set of context.
name
string
required
A name to reference and search.
notifyWhen
enum
required
The condition for throttling the notification.
Values:
onActionGroupChange
onActiveAlert
onThrottleInterval
params
object
required
The parameters to pass to the alert type executor params value. This will also validate against the alert type params validator, if defined.
schedule
object
required
The schedule specifying when this alert should be run. A schedule is structured such that the key specifies the format you wish to use and its value specifies the schedule.
−
Hide 1 property
interval
string
The interval format specifies the interval in seconds, minutes, hours or days at which the alert should run.
tags
string []
A list of keywords to reference and search.
throttle
string
How often this alert should fire the same actions. This will prevent the alert from sending out the same notification over and over. For example, if an alert with a schedule of 1 minute stays in a triggered state for 90 minutes, setting a throttle of 10m or 1h will prevent it from sending 90 notifications during this period.
200
Indicates a successful call.
application/json
apiKeyOwner
string
nullable
createdAt
string · format: date-time
The date and time that the alert was created.
createdBy
string
The identifier for the user that created the alert.
enabled
boolean
Indicates whether the alert is currently enabled.
executionStatus
object
+
Show 2 properties
lastExecutionDate
string · format: date-time
id
string
The identifier for the alert.
mutedInstanceIds
string []
nullable
name
string
The name of the alert.
schedule
object
+
Show 1 property
updatedBy
string
nullable
The identifier for the user that updated this alert most recently.
401
Authorization information is missing or invalid.
application/json
error
enum
Values:
Unauthorized
statusCode
enum
Values:
401
Thank you for your feedback.
Base URL
https://{kibana_url}
Examples
Request
Console
1 / 2 languages
‹
›
1
2
3
4
5
6
7
PUT kbn:/api/alerts/alert/41893910-6bca-11eb-9e0d-85d233e3ee35
{
"name": "string",
"notifyWhen": "onActionGroupChange",
"params": {},
"schedule": {}
}
Generated from the API spec
1
2
3
4
5
6
7
8
9
10
curl -X PUT "${KIBANA_URL}/api/alerts/alert/41893910-6bca-11eb-9e0d-85d233e3ee35" \
-H "kbn-xsrf: true" \
-H "Authorization: ApiKey ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"notifyWhen": "onActionGroupChange",
"params": {},
"schedule": {}
}'
Generated from the API spec
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"actions": [
{}
],
"alertTypeId": ".index-threshold",
"apiKeyOwner": "elastic",
"createdAt": "2022-12-05T23:36:58.284Z",
"createdBy": "elastic",
"enabled": true,
"executionStatus": {
"lastExecutionDate": "2022-12-06T00:13:43.890Z",
"status": "ok"
},
"id": "b530fed0-74f5-11ed-9801-35303b735aef",
"muteAll": false,
"mutedInstanceIds": [
"string"
],
"name": "my alert",
"notifyWhen": "onActionGroupChange",
"params": {},
"schedule": {
"interval": "string"
},
"scheduledTaskId": "b530fed0-74f5-11ed-9801-35303b735aef",
"tags": [
"string"
],
"throttle": "string",
"updatedAt": "2022-12-05T23:36:58.284Z",
"updatedBy": "elastic"
}
Generated from the API spec
1
2
3
4
5
{
"error": "Unauthorized",
"message": "string",
"statusCode": 401
}
Generated from the API spec