Package ubic.gemma.rest
Class RootWebService
- java.lang.Object
-
- ubic.gemma.rest.RootWebService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RootWebService.ApiInfoValueObject
static class
RootWebService.UserValueObject
-
Constructor Summary
Constructors Constructor Description RootWebService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseDataObject<RootWebService.ApiInfoValueObject>
getApiInfo(javax.ws.rs.core.UriInfo uriInfo)
Returns an object with API information.ResponseDataObject<RootWebService.UserValueObject>
getMyself()
Retrieve user information for the current user.ResponseDataObject<RootWebService.UserValueObject>
getUser(String username)
Retrieve user information.
-
-
-
Method Detail
-
getApiInfo
@GET @Produces("application/json") public ResponseDataObject<RootWebService.ApiInfoValueObject> getApiInfo(@Context javax.ws.rs.core.UriInfo uriInfo)
Returns an object with API information.
-
getMyself
@GET @Path("/users/me") @Produces("application/json") @PreAuthorize("isAuthenticated()") public ResponseDataObject<RootWebService.UserValueObject> getMyself()
Retrieve user information for the current user.
-
getUser
@GET @Path("/users/{username}") @Produces("application/json") @PreAuthorize("(isAuthenticated() && principal.username == #username) || hasAuthority(\'GROUP_ADMIN\')") public ResponseDataObject<RootWebService.UserValueObject> getUser(@PathParam("username") String username)
Retrieve user information.This method only works for authenticated users (via basic HTTP auth or their JSESSIONID cookie as specified by the
SecurityScheme
annotation on this class. If the current authenticated user is an administrator, any user can be retrieved with this endpoint, otherwise only the current user is accessible.- Parameters:
username
- the username
-
-