Managing the addition and removing of the dynamic hosts

Either use DCD (if you get host data via piggyback) or use the API to create the hosts: https://checkmk.com/cms_web_api.html

The API will be rewritten in the next version to be REST-based: https://blog.checkmk.com/checkmk-conference-6-one-api-to-rule-them-all