Skip to main content

removeUsers

EmployeeFullArrayWrapper removeUsers(UpdateMembersRequestDto)

PUT /api/2.0/people/delete

Delete users

Deletes several portal profiles in one call and queues the erasure of the data behind each of them. Every listed account has to be disabled already - set the Terminated status through PUT api/2.0/people/status/{status} first, because a single account that is still active rejects the whole call with 403 - and the caller needs the permission to add and remove users. System and LDAP accounts are dropped from the list without an error, and so are the accounts the caller may not delete: a room admin when the caller is not a DocSpace admin, and a DocSpace admin when the caller is not the portal owner. The answer lists every account that was asked for, including the ones that were skipped, so it is not proof that an account was deleted - read GET api/2.0/people/{userId} for that, which then answers 404. The removal is permanent and cannot be undone, and each deleted account raises a UserDeleted webhook while its data is erased by a queued job that can be watched through GET api/2.0/people/remove/progress/{userId}. Hand the rooms and the shared files over first through POST api/2.0/people/reassign/start - an account with an unfinished reassignment cannot be deleted.

Parameters​

NameInTypeDescriptionNotes
UpdateMembersRequestDtobodyUpdateMembersRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200Every account that was asked for, including the ones that were skippedEmployeeFullArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The userIds field is missing--
403No permissions to perform this action, one of the listed accounts is not disabled, or the OAuth service refused to remove the OAuth clients of an account--
500A reassignment of the data of one of the listed accounts has not finished yet, or the OAuth service cannot be reached--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

EmployeeFullArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json