check this:
ANd you have to use get_ruleset and then set_ruleset, you need the configuration_hash ID its very important
https://checkmk.com/cms_web_api_references.html#get_rulset