Discard pending changes using restapi

Hi everyone,

We’ve been automating all our activity with the rest api but can’t seem to find a way to discard pending changes, is there any way available to do so that doesnt requiere human interaction?

Thanks!

Why would you have pending changes that need to be discarded if everything is automated?

1 Like

Hi!,

When we create a rule we also update downtimes and other objects and then we activate changes. If any of the 4-5 calls fails we would like to discard any pending changes instead of committing with half the changes applied.

Maybe we’re approaching it the wrong way, any feedback is appreciated.

Thanks for your time!

Checkmk initially saves all changes you make only in a temporary configuration environment , in which you manage hosts, services and settings, and which does not yet affect the currently-running monitoring. Only by ‘activating the pending changes’ will these be transferred to the production monitoring environment . Hence you are not committing with half the changes applied.

But if you don’t discard dirty changes, your automation will keep changing your configuration with new changes on top of the previous that didn’t work for whatever reason, unless you stop your automation to discard manually those changes.

1 Like

yes checkmk, doesn’t have revert changes in restapi yet. maybe in future releases they will add them. Re-applying the older changes again on top of the new changes can be a workaround.

@mfernandez You are not the first one that misses this option. There’s already a feature request which you may want to upvote:

1 Like