Skip to Main Content
Status Initial review
Categories API
Created by Paulo Ferreira
Created on Oct 3, 2024

Retrieve all Roles using Rest API

Please, fill in the below fields to enable the processing of your idea.

Who would benefit?

Everyone that uses the Rest API and needs to manage users without using the Remoting API dependencies.

What impact would it make?

Users would be able to use the Rest API and they would be able to manage the Roles via Rest API without using the Remoting dependencies in their projects.

How should it work?

A new method in the Rest API would be available to get all the Roles that are available in the inriver environment.

Why is it needed?

Because the Roles are not available via API and are the other way of getting the roles are using the Remoting API. If a project can't use inriver dependencies from the nuget packages, we can't access the roles we need.




The actual method system/roles that exists in the Swagger does not provide all roles, they just provide the roles belonging to the key that is being used. In my humble opinion, this is not a good choice, because it's confusing when using the Rest API, as the same method has an option to get the roles by user. So why can't this method really return all the existing roles? Thanks!

  • Attach files
  • Kate Gillespie
    Reply
    |
    Nov 8, 2024

    Agreed - I have been investigating the REST APIs available for user management in the last weeks and was disappointed to find the /roles endpoint does not actually return all roles as implied by the name and that this functionality only exists within the Remoting API. Having the ability to retrieve all roles via REST would greatly improve our experience/implementation rather than having to create a workaround with the Remoting API.

  • Srini Kaila
    Reply
    |
    Oct 3, 2024

    I agree with Paulo. Existing method should return all roles when called by an Administrator. It's returning only the roles that user is assigned with.

    If Users method return all users, shouldn't Roles method return all roles?