Module: check_mk
Branch: master
Commit: 2f0f46a2d05838a482c84e97e8afddd62d6681f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f0f46a2d05838…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Feb 7 15:44:29 2017 +0100
4023 WATO Web API: Now able to add/edit/delete htpasswd users
New functions for the WATO Web-API have been introduced.
You can now manage htpasswd users with automation calls.
The following (not very fleshed out) examples provide a quick overview.
A more elaborate version will be written later on in our official manual.
<pre>
Common url prefix:
http://localhost/heute/check_mk/webapi.py?_username=automation&_secret=…1122...
To get a list of all supported attributes, you'll need to have a look in the actual
config files
~/etc/check_mk/conf.d/wato/contacts.mk
~/etc/check_mk/multisite.d/wato/users.mk
Add users:
curl {common_prefix}&action=add_users -d 'request={"users":
{"klaus": {"alias": "mr. klaus", "password":
"1234", "contactgroups": ["all"]}}}'
Edit users:
curl {common_prefix}&action=edit_users -d 'request={"users":
{"klaus": {"set_attributes": {"alias": "mr.
santa"}, "unset_attributes": ["contactgroups"]}}}'
Delete users:
curl {common_prefix}&action=delete_users -d 'request={"users":
["klaus", "guest12", "guest2332"]}'
</pre>
Change-Id: Iebbfb0f42dd4d4563662e586ef607104c2477e4b
---
.werks/4023 | 32 ++++++++++++++++++++++++++++++++
ChangeLog | 1 +
2 files changed, 33 insertions(+)
diff --git a/.werks/4023 b/.werks/4023
new file mode 100644
index 0000000..a9c6aa0
--- /dev/null
+++ b/.werks/4023
@@ -0,0 +1,32 @@
+Title: WATO Web API: Now able to add/edit/delete htpasswd users
+Level: 2
+Component: wato
+Compatible: compat
+Version: 1.4.0i4
+Date: 1486477736
+Class: feature
+
+
+New functions for the WATO Web-API have been introduced.
+You can now manage htpasswd users with automation calls.
+
+The following (not very fleshed out) examples provide a quick overview.
+A more elaborate version will be written later on in our official manual.
+
+<pre>
+Common url prefix:
+http://localhost/heute/check_mk/webapi.py?_username=automation&_secret=1122...
+
+To get a list of all supported attributes, you'll need to have a look in the actual
config files
+~/etc/check_mk/conf.d/wato/contacts.mk
+~/etc/check_mk/multisite.d/wato/users.mk
+
+Add users:
+curl {common_prefix}&action=add_users -d 'request={"users":
{"klaus": {"alias": "mr. klaus", "password":
"1234", "contactgroups": ["all"]}}}'
+
+Edit users:
+curl {common_prefix}&action=edit_users -d 'request={"users":
{"klaus": {"set_attributes": {"alias": "mr.
santa"}, "unset_attributes": ["contactgroups"]}}}'
+
+Delete users:
+curl {common_prefix}&action=delete_users -d 'request={"users":
["klaus", "guest12", "guest2332"]}'
+</pre>
diff --git a/ChangeLog b/ChangeLog
index bd8c0ab..5b8fd13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -127,6 +127,7 @@
* 4319 Reworked the service discovery dialog...
* 4320 Distributed: Master site has now also site specific global settings...
* 4022 Removed no longer supported (hidden) WATO feature: wato_hidden_users
+ * 4023 WATO Web API: Now able to add/edit/delete htpasswd users...
* 4003 FIX: esx_vsphere_objects: fixed check parameters display bug during WATO
service discovery
* 4146 FIX: Fixed broken "Global settings" when having the Event Console
disabled via "omd config"
* 4218 FIX: Disabling replication with a site did not clear the changes for this site
(1.4.0i3 regression)