Spaces method and path for this operation:
post /s/{space_id}/api/alerting/rule/{id}/snooze_schedule
Refer to Spaces for more information.
When you snooze a rule, the rule checks continue to run but alerts will not generate actions. You can snooze for a specified period of time and schedule single or recurring downtimes.
POST
/api/alerting/rule/{id}/snooze_schedule
curl \
--request POST 'https://localhost:5601/api/alerting/rule/{id}/snooze_schedule' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '"{\n \"schedule\": {\n \"custom\": {\n \"duration\": \"8h\",\n \"recurring\": {\n \"every\": \"1w\",\n \"occurrences\": 4,\n \"onWeekDay\": [\n \"MO\"\n ]\n },\n \"start\": \"2025-03-17T09:00:00.000Z\",\n \"timezone\": \"UTC\"\n }\n }\n}"'
Request examples
Snooze a rule on a recurring weekly schedule
A request that snoozes a rule every Monday for 8 hours, for 4 occurrences.
{
"schedule": {
"custom": {
"duration": "8h",
"recurring": {
"every": "1w",
"occurrences": 4,
"onWeekDay": [
"MO"
]
},
"start": "2025-03-17T09:00:00.000Z",
"timezone": "UTC"
}
}
}
A request that snoozes a rule for 24 hours starting now.
{
"schedule": {
"custom": {
"duration": "24h",
"start": "2025-03-12T12:00:00.000Z",
"timezone": "UTC"
}
}
}
Response examples (200)
A response that contains the created snooze schedule.
{
"schedule": {
"custom": {
"duration": "24h",
"start": "2025-03-12T12:00:00.000Z",
"timezone": "UTC"
},
"id": "9ac67950-6737-11ec-8ded-d7f6e1581b26"
}
}