Class RolesAPI


  • @Path("roles")
    public class RolesAPI
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RolesAPI()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      jakarta.ws.rs.core.Response membersForRole​(String role_name, int firstResult, int maxResults, org.gcube.idm.common.models.IdmUser.USERS_REPR format)
      Returns the list of members (users + services_accounts) with the given role in the context
      jakarta.ws.rs.core.Response role​(String role_name)
      Returns role by name
      jakarta.ws.rs.core.Response search​(String search, int firstResult, int maxResults, KCRolesController.ROLES_REPR format)
      Returns roles in context
      jakarta.ws.rs.core.Response servicesAccountsForRole​(String role_name, int firstResult, int maxResults, org.gcube.idm.common.models.IdmUser.USERS_REPR format)
      Returns the list of users with role in the context
      jakarta.ws.rs.core.Response usersForRole​(String role_name, int firstResult, int maxResults, org.gcube.idm.common.models.IdmUser.USERS_REPR format)
      Returns the list of users with role in the context
    • Constructor Detail

      • RolesAPI

        public RolesAPI()
    • Method Detail

      • search

        @GET
        @Path("/")
        @Produces("application/json")
        public jakarta.ws.rs.core.Response search​(@QueryParam("search") @DefaultValue("")
                                                  String search,
                                                  @QueryParam("first") @DefaultValue("0")
                                                  int firstResult,
                                                  @QueryParam("max") @DefaultValue("100")
                                                  int maxResults,
                                                  @QueryParam("format") @DefaultValue("name")
                                                  KCRolesController.ROLES_REPR format)
        Returns roles in context
        Parameters:
        format - roles response format
        firstResult - pagination offset
        maxResults - maximum results size
        search - filter by name
      • role

        @GET
        @Path("/{role_name}")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response role​(@PathParam("role_name")
                                                String role_name)
        Returns role by name
      • membersForRole

        @GET
        @Path("/{role_name}/members")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response membersForRole​(@PathParam("role_name")
                                                          String role_name,
                                                          @QueryParam("first") @DefaultValue("0")
                                                          int firstResult,
                                                          @QueryParam("max") @DefaultValue("100")
                                                          int maxResults,
                                                          @QueryParam("format") @DefaultValue("username")
                                                          org.gcube.idm.common.models.IdmUser.USERS_REPR format)
        Returns the list of members (users + services_accounts) with the given role in the context
        Parameters:
        format - users response format
        role_name - the role
        firstResult - pagination offset
        maxResults - maximum results size
      • usersForRole

        @GET
        @Path("/{role_name}/users")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response usersForRole​(@PathParam("role_name")
                                                        String role_name,
                                                        @QueryParam("first") @DefaultValue("0")
                                                        int firstResult,
                                                        @QueryParam("max") @DefaultValue("100")
                                                        int maxResults,
                                                        @QueryParam("format") @DefaultValue("username")
                                                        org.gcube.idm.common.models.IdmUser.USERS_REPR format)
        Returns the list of users with role in the context
        Parameters:
        format - users response format
        role_name - the role
        firstResult - pagination offset
        maxResults - maximum results size
      • servicesAccountsForRole

        @GET
        @Path("/{role_name}/service_accounts")
        @Produces({"application/json;charset=UTF-8","application/vnd.api+json"})
        public jakarta.ws.rs.core.Response servicesAccountsForRole​(@PathParam("role_name")
                                                                   String role_name,
                                                                   @QueryParam("first") @DefaultValue("0")
                                                                   int firstResult,
                                                                   @QueryParam("max") @DefaultValue("100")
                                                                   int maxResults,
                                                                   @QueryParam("format") @DefaultValue("username")
                                                                   org.gcube.idm.common.models.IdmUser.USERS_REPR format)
        Returns the list of users with role in the context
        Parameters:
        format - users response format
        role_name - the role
        firstResult - pagination offset
        maxResults - maximum results size