yuuvis® RAD Q&A

0 votes
by (420 points)

Hi,
we plan to implement an non AD-Environment with multiple stages: Development, Staging and Productive and therefore we have to create a lot of users several times. How can we create yuuvis-users via API? (or via other automated way)
best regards

2 Answers

0 votes
by (19.6k points)

Hello,

you can use the OrganizationService.cerateUser endpoint of the REST-WS API

![][1]

Best regards
Nicolai
[1]: https://qa-rad.yuuvis.com/?qa=blob&qa_blobid=15827315216161000615

0 votes
by (5.4k points)

If you plan to add/create lots of users/groups, it is better to use the batch-create (POST /organization/batch/create), since it will be more efficient.

If users are added individiually, it will trigger several actions in backend (such as ACL and inbox calculations) that can become costly when adding one by one - you can notice slowdown as you add more and more users individually.

best regards,
bratislav

by (420 points)
Thank you very much! We tested the creation of users and groups, but we somehow didn't find an option there to make a role assignment. Is this provided by API?

P.S.: in Swagger description: https://<server-name>/rest-ws/swagger.html?urls.primaryName=OrganizationService#/Endpoints/createUser
resp.
https://<Servername>/rest-ws/swagger.html?urls.primaryName=OrganizationService#/Endpoints/createGroup

is "uri" in both cases - but uri itself leads to an error, it must be "useruri" in both cases (as also described in the schema)
by (5.4k points)
Hi,

to add role to organization, please use POST /management/roles/addRolesToOrganizationObject
For testing purposes it is probably the easiest to assign roles to groups and they will be then inherited by users in those groups

I just saw that swagger description is missing there (example&schema) and have created ticket to be corrected (ERA-9168).
Until it is done, you can go to management-studio and change role of a user, that way you will have a working example for the payload.

As for the uri/useruri issue, I have also created ticket for this to be corrected (ERA-9169)
by (100 points)
Hi, is there an update about this?

We would like to use "/management/roles/addOrganizationObjectsToRole" and "/management/roles/addRolesToOrganizationObject" but have no swagger information about POST body. Could you please reply with a body example so we can continue our development?

Thank you.
...