@Path(value="/user")
public interface UserResource
Modifier and Type | Method and Description |
---|---|
NodeRestrictionResponse |
addGroupNodeRestriction(String id,
String groupId,
String nodeId)
Add node restriction to the assignment of the user to the group
|
GroupLoadResponse |
addToGroup(String id,
String groupId)
Add user to the group
|
javax.ws.rs.core.Response |
deactivate(String id)
Deactivate the user with given ID
|
GenericResponse |
deleteUserData(String key)
Delete the user data for the given key
|
UserLoadResponse |
get(String id)
Load user with given ID
|
UserDataResponse |
getAllUserData()
Get complete user data
|
NodeRestrictionResponse |
getGroupNodeRestrictions(String id,
String groupId)
Get node restrictions for the assignment of the user to the group
|
UserLoadResponse |
getMe(boolean groups)
Get the current user (me)
By default, the user's groups are not returned.
|
UserDataResponse |
getUserData(String key)
Get user data for the given key
|
GroupList |
groups(String id,
FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List groups of given user.
The result can be filtered by id
name
and sorted by
id
name
|
UserList |
list(FilterParameterBean filter,
SortParameterBean sorting,
PagingParameterBean paging,
PermsParameterBean perms)
List users.
The result can be filtered by id
login
firstName
lastName
email
and sorted by
id
login
firstName
lastName
email
|
UserListResponse |
list(Integer skipCount,
Integer maxItems,
List<Integer> ids,
List<String> logins,
List<String> firstNames,
List<String> lastNames,
List<String> eMails,
List<Integer> groupIds,
String search,
UserSortAttribute sortBy,
SortOrder sortOrder,
boolean addGroups)
Get a list of users, optionally filtered, sorted and paged
|
javax.ws.rs.core.Response |
removeFromGroup(String id,
String groupId)
Remove user from the group
|
NodeRestrictionResponse |
removeGroupNodeRestriction(String id,
String groupId,
String nodeId)
Remove node restriction from the assignment of the user to the group
|
GenericResponse |
save(Integer id,
UserSaveRequest request)
Deprecated.
Use
PUT /rest/user/{id} instead |
GenericResponse |
saveUserData(String key,
com.fasterxml.jackson.databind.JsonNode jsonData)
Save user data for the given key
|
UserLoadResponse |
update(String id,
User item)
Update user with given ID
|
@GET @Path(value="/me") UserLoadResponse getMe(@QueryParam(value="groups") @DefaultValue(value="false") boolean groups)
groups
- Whether to list the user's groups@GET @Path(value="/list") UserListResponse list(@QueryParam(value="skipCount") @DefaultValue(value="0") Integer skipCount, @QueryParam(value="maxItems") @DefaultValue(value="-1") Integer maxItems, @QueryParam(value="id") List<Integer> ids, @QueryParam(value="login") List<String> logins, @QueryParam(value="firstname") List<String> firstNames, @QueryParam(value="lastname") List<String> lastNames, @QueryParam(value="email") List<String> eMails, @QueryParam(value="group") List<Integer> groupIds, @QueryParam(value="search") String search, @QueryParam(value="sortby") UserSortAttribute sortBy, @QueryParam(value="sortorder") @DefaultValue(value="asc") SortOrder sortOrder, @QueryParam(value="groups") @DefaultValue(value="false") boolean addGroups)
skipCount
- number of elements to be skipped (paging)maxItems
- maximum number of elements returned (paging)ids
- id(s) for filteringlogins
- login string(s) for filteringfirstNames
- firstname string(s) for filteringlastNames
- lastname string(s) for filteringeMails
- email string(s) for filteringgroupIds
- group id(s) for filteringsearch
- additionally search in users logins, firstNames, lastNames and
emailssortBy
- name of an attribute to sortsortOrder
- sort orderaddGroups
- true to add groups to the users, false (default) otherwise@POST @Path(value="/save/{id}") @Deprecated GenericResponse save(@PathParam(value="id") Integer id, UserSaveRequest request)
PUT /rest/user/{id}
insteadid
- Id of the user to save.request
- user save request@POST @Path(value="/me/data/{key}") @Consumes(value="application/json") @Produces(value="application/json") GenericResponse saveUserData(@PathParam(value="key") String key, com.fasterxml.jackson.databind.JsonNode jsonData)
key
- key of the user data to savejsonData
- user data in JSON format@GET @Path(value="/me/data/{key}") @Produces(value="application/json") UserDataResponse getUserData(@PathParam(value="key") String key)
key
- key of the user data@DELETE @Path(value="/me/data/{key}") @Produces(value="application/json") GenericResponse deleteUserData(@PathParam(value="key") String key)
key
- key of the user data@GET @Path(value="/me/data") @Produces(value="application/json") UserDataResponse getAllUserData()
@GET UserList list(@BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
login
firstName
lastName
email
id
login
firstName
lastName
email
filter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- perms parametersException
- in case of errors@GET @Path(value="/{id}") UserLoadResponse get(@PathParam(value="id") String id) throws Exception
id
- local user IDException
@PUT @Path(value="/{id}") UserLoadResponse update(@PathParam(value="id") String id, User item) throws Exception
id
- local user IDitem
- new user dataException
@DELETE @Path(value="/{id}") javax.ws.rs.core.Response deactivate(@PathParam(value="id") String id) throws Exception
id
- local user IDException
@GET @Path(value="/{id}/groups") GroupList groups(@PathParam(value="id") String id, @BeanParam FilterParameterBean filter, @BeanParam SortParameterBean sorting, @BeanParam PagingParameterBean paging, @BeanParam PermsParameterBean perms) throws Exception
id
name
id
name
id
- local user IDfilter
- filter parameterssorting
- sorting parameterspaging
- paging parametersperms
- permissions parametersException
@PUT @Path(value="/{id}/groups/{groupId}") GroupLoadResponse addToGroup(@PathParam(value="id") String id, @PathParam(value="groupId") String groupId) throws Exception
id
- local user IDgroupId
- local group IDException
@DELETE @Path(value="/{id}/groups/{groupId}") javax.ws.rs.core.Response removeFromGroup(@PathParam(value="id") String id, @PathParam(value="groupId") String groupId) throws Exception
id
- local user IDgroupId
- local group IDException
@GET @Path(value="/{id}/groups/{groupId}/nodes") NodeRestrictionResponse getGroupNodeRestrictions(@PathParam(value="id") String id, @PathParam(value="groupId") String groupId) throws Exception
id
- user IDgroupId
- group IDException
@PUT @Path(value="/{id}/groups/{groupId}/nodes/{nodeId}") NodeRestrictionResponse addGroupNodeRestriction(@PathParam(value="id") String id, @PathParam(value="groupId") String groupId, @PathParam(value="nodeId") String nodeId) throws Exception
id
- user IDgroupId
- group IDnodeId
- node IDException
@DELETE @Path(value="/{id}/groups/{groupId}/nodes/{nodeId}") NodeRestrictionResponse removeGroupNodeRestriction(@PathParam(value="id") String id, @PathParam(value="groupId") String groupId, @PathParam(value="nodeId") String nodeId) throws Exception
id
- user IDgroupId
- group IDnodeId
- node IDException
Copyright © 2024 Gentics Software. All rights reserved.