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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| userId | query | UUID (uuid) | The ID of the user whose rooms and shared files are checked. | [optional] [example: 00000000-0000-0000-0000-000000000000] |
| type | query | EmployeeType | The 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 code | Description | Type | Response headers |
|---|---|---|---|
| 200 | True if the data of the user has to be reassigned before the removal or the type change | BooleanWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 403 | No permissions to perform this action | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 500 | Internal Server Error. | ErrorApiResponse | - |
| 400 | Bad Request. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: Not defined
- Accept: application/json