Skip to main content

necessaryReassign

BooleanWrapper necessaryReassign(userId, type)

GET /api/2.0/people/reassign/necessary

Check data for reassignment need

Reports whether the rooms and the shared files of a user have to be reassigned before that user can be removed or changed to the type passed in type. Call it before DELETE api/2.0/people/{userId} or before a type change to find out whether POST api/2.0/people/reassign/start has to run first. The caller needs the permission to add and remove users of the requested type, and must be the portal owner when the checked user is a DocSpace administrator. The call is read-only and answers true when the user owns at least one room, or - when type is Guest - when the user still has shared files. A false answer means the user can be removed or converted without a reassignment.

Parameters​

NameInTypeDescriptionNotes
userIdqueryUUID (uuid)The ID of the user whose rooms and shared files are checked.[optional] [example: 00000000-0000-0000-0000-000000000000]
typequeryEmployeeTypeThe type the user is about to be changed to, which decides what counts as data that has to be reassigned: RoomAdmin, DocSpaceAdmin and User are checked for owned rooms only, while Guest is also checked for files that are still shared. The default is All, which checks owned rooms only.[optional] [example: RoomAdmin] [enum: All, RoomAdmin, Guest, DocSpaceAdmin, User]

Responses​

Status codeDescriptionTypeResponse headers
200True if the data of the user has to be reassigned before the removal or the type changeBooleanWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403No permissions to perform this action--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
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​

BooleanWrapper

Authorization​

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

HTTP request headers​

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