REST: How to get all users whose role is not admin?

How to get all users whose role is not admin?

Hi,

I want my user with role admin to be able to see all other users and to make changes in their properties. Is it possible to be made through REST API?

Thanks

Hi @Atanas_Stanchev,

what about to create a custom security role “Admin” and give it full permissions to find and update objects from the Users table?

Hi,
I made that role and it has that permissions, butI want to know if I can make one call to the database to retrieve all users that don’t have role admin. I can retrieve them all and after that for each one I can make call to ‘users/userrole’ and check their roles, but is there a way to do that with one request?

Regards

Unfortunately there is no such route yet.
But we have another one that loads all users by the roleName. It also accepts a data query.
If you’ll assign for all non-admin users the same role (e.g. ‘regular’ user), you may use this.

GET /:appId/:apikey/users/role/:roleName

Note: this route work only when using Coderunner API Key (so I’d recommend to create a method in Business Logic).

Regards,
Stanislaw

Thanks for your quick response.

Regards,
Atanas