We use cookies to ensure that we give you the best experience on our website.  Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

Werk #6689: WATO API: Introduced new functions set_all_sites/get_all_sites

ComponentWATO
TitleWATO API: Introduced new functions set_all_sites/get_all_sites
Date2018-11-19 15:26:52
Checkmk EditionCheckmk Raw Edition (CRE)
Checkmk Version1.6.0b1
LevelTrivial Change
ClassNew Feature
CompatibilityCompatible - no manual interaction needed

The new request get_all_sites allows you to fetch all site configurations with a single call. This call returns a python dictionary with the following content

{'configuration_hash': 'bba0d7cd362dc42af2f36f3d7dfed193',
'sites': {'heute': {'alias': u'Local site heute',
'disable_wato': True,
'disabled': False,
'insecure': False,
'multisiteurl': '',
'persist': False,
'replicate_ec': False,
'replication': '',
'socket': 'tcp:1.2.3.4:6557',
'timeout': 10,
'user_login': True}}}

The response from the previous call can be modified, e.g. add a new site and written back with the request set_all_sites.

{'configuration_hash': '3a11df6985ff799eca7310f35a8f575d',
'sites': {'heute': {'alias': u'Local site heute',
'disable_wato': True,
'disabled': False,
'insecure': False,
'multisiteurl': '',
'persist': False,
'replicate_ec': False,
'replication': '',
'socket': 'tcp:1.2.3.4:6557',
'timeout': 10,
'user_login': True},
'new_site': {'alias': u'Local site heute',
'disable_wato': True,
'disabled': False,
'insecure': False,
'multisiteurl': '',
'persist': False,
'replicate_ec': False,
'replication': '',
'socket': 'tcp:1.2.3.4:6557',
'timeout': 10,
'user_login': True}}}