|Titel||WATO Web-API: Now able to configure host tags|
|Checkmk Edition||Checkmk Raw Edition (CRE)|
|Kompatibilität||Kompatibel - benötigt kein manuelles Eingreifen|
You can now configure the WATO Hosttags through the new API calls get_hosttags and set_hosttags.
Important: These API calls are intended for admin use only, since they modify the entire hosttags configuration.
This API call does not require any additional info. It simply returns a dictionary with all tag_group and aux_tags. The response also includes an extra key configuration_hash, which can be used in the following call.
The previous call provided a dict with the hosttags configuration. This call expect the same format in the request object. You can modify the modify the previously queried dict and send it back. If you also sent the configuration_hash parameter, the Web-API will check if the configuration has changed in the meantime. If so, the set_hosttags call will fail. When no configuration_hash parameter is sent, no checking will be done and the configuration is completely overwritten. However, there are some final checks before the configuration is applied. First of all, the syntax and dependencies are checked. Furthermore, the api call checks whether all explicitely configured host tags are still present in the updated configuration. You can not set hosttags when the operation would introduce corrupt host tag settings.