This worked quite well until 2.0.0p15, where the user creation stopped working, which forced me to fork the WebAPI-Lib or migrate to the REST API.
At this point I found out, that not all user properties are populated by the REST API and even worse: Setting them causes an error -.-
Did I miss something? Is there a āadditional configā field or something like that?
The fields I tried to configure (configured with the old WebAPI):
May be I should workaround the whole problem the hard (old) way and start editing / generate config files again, at least there are no hidden options (or fancy bugs introduced in a new patch release)
If no one uses this functions then the probability is small
I had a look at the interactive API gui and got some strange results.
As you found out the āenforce_pw_changeā is rejected as a unknown field. You can use āenforce_password_changeā but the transferred value is not used anywhere ā BUG
I think the problem can be found inside this file
cmk/gui/plugins/openapi/restful_objects/request_schemas.py
If the UpdateUser class is changed/extended with the right attributes it will work.
The other two options are completely not available thru the API.
Funny fact - inside the tests files you find all the options you want to set.
from tests/unit/cmk/gui/plugins/openapi/test_openapi_user.py
Thanks for the answer (and the re-classification of the topic).
I know that my use case is a little bit uncommon, but I did not know, that this is a community only forum, I expected some developer presence here, too (at least because the possiblity of bug reports or possible improvement requests/ideas).
And another thanks for the digging, too. As far as I can see, the CreateUser class must be extended(, too), the UpdateUser class contains at least the enforce_password_change parameter. But I found this:
# The interface options must be set for a new user but we restrict the setting through the API
Sometimes I get the impression that the team working on the REST API is completely separate from the rest of the checkmk developers and do not know anything about the application, @LaMi ā¦
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.