Skip to main content

changeFileOwner

FileEntryBaseArrayWrapper changeFileOwner(ChangeOwnerRequestDto)

POST /api/2.0/files/owner

Change the room or file owner

Hands the ownership of the listed rooms and files over to a single account, and returns the entries as they look afterwards. Among folders only rooms are accepted - take their identifiers from GET api/2.0/files/rooms; a plain folder is refused. A file is accepted only while it lies in the portal's common section, so a file kept inside a room or in a personal section is refused as well, and so is a file that is locked or currently open in the editor. The new owner has to be an active account that is allowed to manage rooms, and a private room additionally requires that this account has already set up its encryption keys; a deactivated account, a guest or a plain member is rejected. The caller must be the creator of every listed room, or a portal administrator. The call mutates the entries one at a time and stops at the first item it may not touch, leaving the entries already processed changed, so a partial answer is possible; an item whose owner is already the target account is returned untouched, which makes a repeat safe. The previous owner keeps access to a transferred room as its manager, while a transferred file is saved as a new version authored by the new owner. An entry that lives on a connected third-party account is quietly left out.

Parameters​

NameInTypeDescriptionNotes
ChangeOwnerRequestDtobodyChangeOwnerRequestDto[optional]

Responses​

Status codeDescriptionTypeResponse headers
200The rooms and files whose owner has been changed, as folder and file objectsFileEntryBaseArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400The request body cannot be read or has no userId--
403The new owner is not an active account allowed to manage rooms or has not set up encryption keys for a listed private room, the caller may not change the owner of a listed entry, a listed folder lies outside the rooms and common sections, or a listed file is locked, being edited or lies outside the common section--
500An id is a number that is not a 32-bit integer--
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​

FileEntryBaseArrayWrapper

Authorization​

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

HTTP request headers​

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