Werk #4700: WATO Web-API: Now able to configure host tags

KomponenteWATO
TitelWATO Web-API: Now able to configure host tags
Datum2017-05-23 17:25:22
Checkmk EditionCheckmk Raw Edition (CRE)
Checkmk Version1.5.0i1
LevelProminent Change
KlasseNew Feature
KompatibilitätKompatibel - 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.

get_hosttags
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.

set_hosttags
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.