User admin API Resource

Abstract class for REST webservices

POST /admin/user

Add user.

Example of request:

{"name":"jdo","userFullName":"John Doe","description":"test user","enabled":true,"email":"jdo@tessel.pl","password":"test"}

Request Body
media type data type description
application/json object The specification of user that has to be added.
Response Body
media type data type description
application/json object JSON Response with information, whether the adding has or has not been succeeded.

GET /admin/user/disable

Disable user. User can't be removed because of audit trail.

Request Parameters
name type description default constraints
userIds query String containing comma separated user IDs.    
Response Body
media type data type description
application/json object JSON Response with information, whether the disabling has or has not been succeeded.

GET /admin/user/enable

Enable user.

Request Parameters
name type description default constraints
userIds query String containing comma separated user IDs.    
Response Body
media type data type description
application/json object JSON Response with information, whether the enabling has or has not been succeeded.

GET /admin/user/hide

Hide user.

Request Parameters
name type description default constraints
userIds query String containing comma separated user IDs.    
Response Body
media type data type description
application/json object JSON Response with information, whether the hide user operation has or has not been succeeded.

POST /admin/user/import

Import

Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object JSON with report of imported users.

Example of response:

{"list":[{"errorCode":"UserAlreadyExistsError","name":"admin","userFullName":"Admin","success":false}]}

GET /admin/user/json

Get list of users. If parameters groups or roles are set then list of users will be filtered (WS will return list of all users in defined roles and all users in defined groups)

Request Parameters
name type description default constraints
groups query list of group IDs separated by comma    
roles query list of roles IDs separated by comma    
Response Body
media type data type description
application/json object JSON with list of users.

Example of response:

{"list":[{"id":1,"name":"admin","userFullName":"Admin","description":"","enabled":true,"email":"","loginCount":1840,"lastLoginDate":"2013-09-26T10:18:36.199072Z","providerName":"Internal"},{"id":2,"name":"user1","userFullName":"User 1","description":"","enabled":true,"email":"","loginCount":784,"lastLoginDate":"2018-10-03T08:10:28.658687Z","linkedAccounts":[{"externalId":"auth0|5b6d5706d347516a66f81443","internalId":7533,"providerName":"symetri_auth0"}],"providerName":"symetri_auth0"}]}

PUT /admin/user/resetparams

Request Parameters
name type description default constraints
userIds query    
Response Body
media type data type description
application/json object

GET /admin/user/show

Show user.

Request Parameters
name type description default constraints
userIds query String containing comma separated user IDs.    
Response Body
media type data type description
application/json object JSON Response with information, whether the show user operation has or has not been succeeded.

DELETE /admin/user/{userId}

Delete user provided that he didn't perform any action.

Request Parameters
name type description default constraints
userId path ID of user   long
Response Body
media type data type description
application/json object JSON Response with information, whether the deleting has or has not been succeeded.

GET /admin/user/{userId}

Get info about given user.

Request Parameters
name type description default constraints
userId path id of user   long
Response Body
media type data type description
application/json object JSON with user properties.

Example of response:

{"parameters":{"HideEmptyFields":{"fieldId":"HideEmptyFields","fieldValue":"false","fieldType":"boolean"},"VersionId":{"fieldId":"VersionId","fieldValue":"20","fieldType":"integer"},"Language":{"fieldId":"Language","fieldValue":"1","fieldType":"integer"}},"id":2,"name":"2","userFullName":"User 1","description":"","enabled":true}

PUT /admin/user/{userId}

Update user. Password won't be considered.

Example of request:

{"name":"jdo","userFullName":"John Doe","description":"test user","enabled":true,"email":"jdo@tessel.pl"}

Request Parameters
name type description default constraints
userId path   long
Request Body
media type data type description
application/json object The specification of user that has to be updated.
Response Body
media type data type description
application/json object JSON Response with information, whether the updating has or has not been succeeded.

POST /admin/user/anonymize/{userId}

Apply GDPR anonymization for input user

Request Parameters
name type description default constraints
userId path - User Id   long
Response Body
media type data type description
application/json object - JSON with information whether operation was success or not

GET /admin/user/exportall/xls

Export all user data to Excel file.

Response Body
media type data type description
application/vnd.ms-excel object xls file with list of all HDC users.

POST /admin/user/exportall/xls

Response Body
media type data type description
application/json object

GET /admin/user/groups/json/{userId}

Get list of groups for given user

Request Parameters
name type description default constraints
userId path ID of user   long
Response Body
media type data type description
application/json object JSON with list of groups.

Example of response:

{"list":[{"id":"18","description":"Members of Tessel Crew group","name":"Tessel Crew"}]}