Class PermissionsApi

  • All Implemented Interfaces:
    org.wso2.msf4j.Microservice

    @Path("/permissions")
    @Consumes("application/json")
    @Produces("application/xml")
    @ApplicationPath("/permissions")
    public class PermissionsApi
    extends Object
    implements org.wso2.msf4j.Microservice
    • Constructor Detail

      • PermissionsApi

        public PermissionsApi()
    • Method Detail

      • deletePermission

        @DELETE
        @Path("/{permissionID}")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response deletePermission​(@PathParam("permissionID")
                                                          String permissionID)
                                                   throws NotFoundException
        Throws:
        NotFoundException
      • getGrantedRoles

        @GET
        @Path("/{permissionID}/roles")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response getGrantedRoles​(@PathParam("permissionID")
                                                         String permissionID)
                                                  throws NotFoundException
        Throws:
        NotFoundException
      • getPermissionStrings

        @GET
        @Path("/app/{appName}")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response getPermissionStrings​(@PathParam("appName")
                                                              String appName)
                                                       throws NotFoundException
        Throws:
        NotFoundException
      • hasPermission

        @GET
        @Path("auth/{permissionID}/{roleName}")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response hasPermission​(@PathParam("permissionID")
                                                       String permissionID,
                                                       @PathParam("roleName")
                                                       String roleName)
                                                throws NotFoundException
        Throws:
        NotFoundException
      • manipulateRolePermission

        @POST
        @Path("/roles/{roleName}")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response manipulateRolePermission​(Permission body,
                                                                  @PathParam("roleName")
                                                                  String roleName,
                                                                  @QueryParam("action")
                                                                  String action)
                                                           throws NotFoundException
        Throws:
        NotFoundException
      • revokePermission

        @POST
        @Path("revoke/{permissionID}")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response revokePermission​(@PathParam("permissionID")
                                                          String permissionID)
                                                   throws NotFoundException
        Throws:
        NotFoundException