CheckMk api edit_user "Value None is not allowed here"

Hello there,

I using the checkmk http api to create contact groups and and assign these groups to users.
Checkmk is getting the users from an ldap sync.

According to the doc i tried this:

curl “http://mycheckmk/side/check_mk/webapi.py?action=edit_users&_username=automation&_secret=1152d7ca-d116-4467-bbf9-2663916f5ce6” -d ‘request={“users”:{“existinguser”:{“set_attributes”:{“contactgroups”:[“existing_groups”]}}}}’

And I get the result:

{“result”: “Check_MK exception: Value None is not allowed here.”, “result_code”: 1}

I am using checkmk version 1.6.0p8.

This are the docs I used Command reference for the HTTP-API.

Does someone know why this is happening.

Thanks for your help

The API call edit_users does not work for non-local accounts (i.e. LDAP users).

I looked at the source code and found out that if rule based notification is disabled
the api looks up a user attribute called ‘notification_method’ and for all the most users this field did not exists and the exception got thrown.

Fixed it be enabling rulebased notifications.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.