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"}

Try it out!

Request Body
media type data type description
application/json HdcUserInfoTO (JSON) The specification of user that has to be added.
Response Body
media type data type description
application/json HdcSuccessWithId (JSON) 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.

Try it out!

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

GET /admin/user/enable

Enable user.

Try it out!

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

GET /admin/user/hide

Hide user.

Try it out!

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

POST /admin/user/import

Import

Try it out!

Request Body
media type data type
multipart/form-data (custom)
Response Body
media type data type description
application/json object (JSON) 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)

Try it out!

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 array of HdcUserInfoTO (JSON) 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

Try it out!

Request Parameters
name type description default constraints
userIds query    
Response Body
media type data type description
application/json HdcSuccessTO (JSON)

GET /admin/user/show

Show user.

Try it out!

Request Parameters
name type description default constraints
userIds query String containing comma separated user IDs.    
Response Body
media type data type description
application/json HdcSuccessTO (JSON) 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.

Try it out!

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

GET /admin/user/{userId}

Get info about given user.

Try it out!

Request Parameters
name type description default constraints
userId path id of user   long
Response Body
media type data type description
application/json HdcSessionTO (JSON) 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"}

Try it out!

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

POST /admin/user/anonymize/{userId}

Apply GDPR anonymization for input user

Try it out!

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

GET /admin/user/exportall/xls

Export all user data to Excel file.

Try it out!

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

Try it out!

Response Body
media type data type description
application/json object (JSON)

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

Get list of groups for given user

Try it out!

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

Example of response:

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