RestAPI User Methods

Hello,

I’m working on automations to set user groups to user via restapi. But when I run edit an user by using the example curl script, I get :

{"title": "User 'hugo' is not known.", "status": 404, "detail": "The user you asked for is not known. Please check for eventual missspellings." }

The same error occurs when I do a show user.
When I check the result from show al user, there are also no Information about the user_id.
I tested with 2.0.0p16. Can anybody confirm this?

Cheers,
Christian

Additional infromation:
The problem belongs to user from LDAP, but from my point of view it should work also.

You cannot edit LDAP users via API.

1 Like

Hi Robert,

in the meantime I also find it, but when you can change the contact group via WATO of LDAP user, why it is not possible to do that with RestAPI? From my point of view it is important when useeer belongs to more than one contact group. I think we need this to discuss with development.

Cheers, Christian

Hi,

I also wanted to change the contactgroup assignment for an LDAP-user via REST API.
The problem for me starts that I was not able to get information via REST-API for an LDAP User, but I already opened a support ticket for the issues.

Regards, Sebastian

1 Like

@ChristianM You can only change the contact group of LDAP users, if their groups are not managed through LDAP. But if you really found a missing feature in the REST API, I can pass this on to the developers for further evaluation.

@N0t0s Maybe you can share the gist of the support ticket here, so others do not need to ask again?

Hi,

Sorry. I wasn’t aware about the forum post any more. :wink:
I did open a support ticket and they fixed the problem.
The Werk is under review and will hopefully released with the next p-version.
If i don’t forget about the post again, i will give you an update for the werk number.

1 Like

Checkmk said it is this werk, which will solve our problems.

1 Like

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.