Hi,
I’m not sure I would solve it in a better way but at least in a different way Because I find the API somewhat limiting (according to my thread Using API to change host vars), I’d say that a restart with static configuration file actually should revert the changes made by the APi. At least it would be useful to force Icinga to use the static file config.
My reasoning is that because I experience I cannot fully use the API for my purposes then at least there should be a way to “go back” to a known configuration set.