Support Topics Documentation Slack YouTube Blog

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

How to get all users whose role is not admin?


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?


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?

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?


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).


Thanks for your quick response.