- Home
- Resources
- User admin API
Abstract class for REST webservices
POST /api/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 |
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. |
Example
Request
POST /api/admin/user
Content-Type: application/json
Accept: application/json
{ }
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
GET /api/admin/user/disable
Disable user. User can't be removed because of audit trail.
Request Parameters
name |
type |
description |
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. |
Example
Request
GET /api/admin/user/disable
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{ }
GET /api/admin/user/enable
Enable user.
Request Parameters
name |
type |
description |
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. |
Example
Request
GET /api/admin/user/enable
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{ }
GET /api/admin/user/hide
Hide user.
Request Parameters
name |
type |
description |
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. |
Example
Request
GET /api/admin/user/hide
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{ }
POST /api/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) |
JSON with report of imported users.
Example of response:
{"list":[{"errorCode":"UserAlreadyExistsError","name":"admin","userFullName":"Admin","success":false}]}
|
Example
Request
POST /api/admin/user/import
Content-Type: multipart/form-data
Accept: application/json
Response
HTTP/1.1 201 Created
Content-Type: application/json
...
GET /api/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 |
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"}]}
|
Example
Request
GET /api/admin/user/json
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ { } ]
PUT /api/admin/user/resetparams
Request Parameters
name |
type |
description |
userIds |
query |
|
Response Body
media type |
data type |
description |
application/json |
HdcSuccessTO
(JSON) |
|
Example
Request
PUT /api/admin/user/resetparams
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
GET /api/admin/user/show
Show user.
Request Parameters
name |
type |
description |
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. |
Example
Request
GET /api/admin/user/show
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{ }
DELETE /api/admin/user/{userId}
Delete user provided that he didn't perform any action.
Request Parameters
name |
type |
description |
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. |
Example
Request
DELETE /api/admin/user/{userId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
GET /api/admin/user/{userId}
Get info about given user.
Request Parameters
name |
type |
description |
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}
|
Example
Request
GET /api/admin/user/{userId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
{ }
PUT /api/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 |
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. |
Example
Request
PUT /api/admin/user/{userId}
Content-Type: application/json
Accept: application/json
{ }
Response
HTTP/1.1 204 No Content
Content-Type: application/json
{ }
POST /api/admin/user/anonymize/{userId}
Apply GDPR anonymization for input user
Request Parameters
name |
type |
description |
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 |
Example
Request
POST /api/admin/user/anonymize/{userId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
{ }
GET /api/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. |
Example
Request
GET /api/admin/user/exportall/xls
Content-Type: */*
Accept: application/vnd.ms-excel
...
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.ms-excel
...
POST /api/admin/user/exportall/xls
Response Body
media type |
data type |
description |
application/json |
object
(JSON) |
|
Example
Request
POST /api/admin/user/exportall/xls
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 201 Created
Content-Type: application/json
...
GET /api/admin/user/groups/json/{userId}
Get list of groups for given user
Request Parameters
name |
type |
description |
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"}]}
|
Example
Request
GET /api/admin/user/groups/json/{userId}
Content-Type: */*
Accept: application/json
...
Response
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"invokerId" : 12345,
"description" : "...",
"external" : true,
"providerType" : "...",
"providerName" : "...",
"id" : 12345,
"idpGuid" : "...",
"managed" : true,
"distinguishedName" : "...",
"name" : "...",
"userCount" : 12345
} ]