Refactoring: Moved more application check parameters from unsorted.py to dedicated...
[check_mk.git] / .werks / 4023
blob8483d162794f83cd5c21b5324b83a619e9a9df07
1 Title: WATO Web-API: Now able to add/edit/delete htpasswd users
2 Level: 2
3 Component: wato
4 Compatible: compat
5 Version: 1.4.0b1
6 Date: 1486477736
7 Class: feature
10 New functions for the WATO Web-API have been introduced.
11 You can now manage htpasswd users with automation calls.
13 The following (not very fleshed out) examples provide a quick overview.
14 A more elaborate version will be written later on in our official manual.
16 <pre>
17 Common url prefix:
18 http://localhost/heute/check_mk/webapi.py?_username=automation&_secret=1122...
20 To get a list of all supported attributes, you'll need to have a look in the actual config files
21 ~/etc/check_mk/conf.d/wato/contacts.mk
22 ~/etc/check_mk/multisite.d/wato/users.mk
24 Add users:
25 curl {common_prefix}&action=add_users -d 'request={"users": {"klaus": {"alias": "mr. klaus", "password": "1234", "contactgroups": ["all"]}}}'
27 Edit users:
28 curl {common_prefix}&action=edit_users -d 'request={"users": {"klaus": {"set_attributes": {"alias": "mr. santa"}, "unset_attributes": ["contactgroups"]}}}'
30 Delete users:
31 curl {common_prefix}&action=delete_users -d 'request={"users": ["klaus", "guest12", "guest2332"]}'
32 </pre>