Remove Maintenance for Services by API requests. "Bug" or "document not accurate enough" or "I'm just blind"?

HI,
i followed API guide:

https://monitoring/mon/check_mk/api/doc/#operation/cmk.gui.openapi.endpoints.downtime.delete_downtime

to remove all maintenances of a host. Previously only specific services were set to maintenance, not the whole host.

API-Docu says:

host_name required string[1]+\Z
If set alone, then all downtimes of the host will be removed.

But if i specify a JSON in Powershell:

$CMK_BODY = @"
{
"delete_type": "params",
"host_name": "HOSTNAME"
}
"@

It will not work. Even it is answered by API with 204
Specific Services of the host are still in maintenance mode. :frowning:

If i specify them separatly, all is fine :slight_smile:

$CMK_BODY = @"
{
  "delete_type": "params",
  "host_name": "HOSTNAME",
  "service_descriptions": [
    "Check_MK inventory",
    "Filesystem Slot-1 Management Root Partition"
  ]
}
"@

But how can i achieve that without mention all separately?

CMK version: Checkmk Managed Services Edition 2.3.0p29
OS version: Ubuntu 22.04
Error message: Both requests are answered by CheckMK API with 204

Thank you.


  1. -0-9a-zA-Z_. ↩︎