BUG: REST API update_discovery_phase is not working for state "monitored"

The API call to update the discovery state of a service is not working for the state “monitored” if you want to enable the monitoring for a found service. The other action ignore is working as expected.


curl -X 'PUT' \
  'http://localhost:5000/cmk/check_mk/api/1.0/objects/host/localhost/actions/update_discovery_phase/invoke' \
  -H 'accept: */*' \
  -H 'Authorization: Basic authstring' \
  -H 'Content-Type: application/json' \
  -d '{
            "target_phase": "monitored",
            "check_type": "df",
            "service_item": "C:/"

Leads to a change inside the monitoring but without enabling the filesystem check for C:.
The response from API is as expected a 204 without any output.

1 Like

Thank you for reporting this issue. We’ll investigate this and will update this post once we have more information.

I must bring this back as nothing changed until now.
For real automation scenarios this is one of the more important functions.

Cioa Andreas,

do you know when this issue will be fixed?

beste Grüße