跳到主要内容

startUserTypeUpdate

TaskProgressResponseWrapper startUserTypeUpdate(StartUpdateUserTypeDto)

POST /api/2.0/people/type

Start updating user type

Queues an asynchronous job that converts one account to Guest or User and, in the same job, hands the rooms and the shared files of that account over to another administrator. Only Guest and User are accepted here, because they are the types that cannot own rooms; for any other type use PUT api/2.0/people/type/{type}, which converts immediately and transfers nothing. The caller needs the permission to add and remove users of the requested type, has to be the portal owner to convert a DocSpace administrator, and converting to Guest also requires the portal to allow inviting guests. The account being converted has to be active and cannot be the caller, and the recipient - reassignUserId, or the caller when it is omitted - has to be an active room admin or DocSpace admin other than that account. The conversion does not finish within this call: poll GET api/2.0/people/type/progress/{userId} with the converted user ID until isCompleted is true, and cancel it through PUT api/2.0/people/type/terminate. A failure inside the running job is reported in the error field of the progress, not as a status code here.

Parameters​

NameInTypeDescriptionNotes
StartUpdateUserTypeDtobodyStartUpdateUserTypeDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The state of the queued user type changeTaskProgressResponseWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The requested type is neither Guest nor User, the account is a system account, disabled or the caller, the recipient is the same account or is not an active admin, or a non-owner tried to convert a DocSpace admin--
403No permissions to perform this action--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.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​

TaskProgressResponseWrapper

Authorization​

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

HTTP request headers​

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