Skip to main content

checkMoveOrCopyDestFolder

CheckDestFolderWrapper checkMoveOrCopyDestFolder(returnSingleOperation, folderIds, fileIds, destFolderId, conflictResolveType, deleteAfter, content, toFillOut)

GET /api/2.0/files/fileops/checkdestfolder

Check the destination folder

Reports whether the destination folder accepts the listed files, before a move or a copy is started. Only fileIds and destFolderId are read from the request: result says whether all of the files are accepted, only some of them or none, and files names the ones that are. The check is about what the destination allows to be stored in it rather than about name clashes — everywhere except a form-filling room every file is accepted, while a form-filling room accepts only PDF forms, so a text document offered to one comes back as none accepted. The caller needs create access to the destination, so a room the caller cannot write to and an archived room are refused with 403, a destination that does not exist is answered as missing, and a request without destFolderId is rejected as an invalid request. Folder ids and the copying options of the request play no part here. The call changes nothing; for same-named entries at the destination use GET api/2.0/files/fileops/move.

Parameters​

NameInTypeDescriptionNotes
returnSingleOperationqueryBooleanWhich operations the answer carries: true returns the operation this call started and nothing else, false returns every operation of the same kind that the caller has running or unread. When nothing was queued, which happens for an empty selection, true falls back to the full list.[optional] [example: false]
folderIdsqueryListThe folders to move or copy, by id. A number addresses a folder stored in the portal itself, a string addresses a folder on a connected third-party account, and both kinds may be sent in one list.[optional] [example: [1, 2, 3]] [nullable]
fileIdsqueryListThe files to move or copy, by id. A number addresses a file stored in the portal itself, a string addresses a file on a connected third-party account, and both kinds may be sent in one list.[optional] [example: [1, 2, 3]] [nullable]
destFolderIdquerycheckMoveOrCopyBatchItems_destFolderId_parameterThe folder the items go to, by id — a number for a folder stored in the portal itself, a string for a folder on a connected third-party account. Take it from a folder listing such as GET api/2.0/files/@root; the caller has to be allowed to create items in it, and the id of a room addresses the root of that room.[optional]
conflictResolveTypequeryFileConflictResolveTypeWhat happens to an item whose name is already taken in the destination folder: skip leaves it where it is, overwrite replaces the entry at the destination, and duplicate places it beside that entry under a name with a numeric suffix. GET api/2.0/files/fileops/move reports which items would clash.[optional] [enum: Skip, Overwrite, Duplicate]
deleteAfterqueryBooleanWhether the finished operation is still reported: false keeps its final record readable through GET api/2.0/files/fileops until it has been read once, true drops the record as soon as the work is done. It deletes nothing: a move takes the sources away in any case, and a copy always leaves them.[optional] [example: false]
contentqueryBooleanWhat is taken from a listed folder: false moves or copies the folder itself, true takes only what it contains, so its files and subfolders land in the destination and the folder is not recreated there.[optional] [example: false]
toFillOutqueryBooleanMarks every copied PDF form as a draft prepared for filling, which is how such a copy reports its filling status in a virtual data room. Files that are not forms are left unaffected.[optional] [example: false]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the destination accepts all of the listed files, some of them or none, and which ones it acceptsCheckDestFolderWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
400destFolderId is not given--
403The caller cannot create items in the destination folder--
404The destination folder does not exist--
500A listed file is on a third-party account and the destination accepts it, or a listed file does not exist while the destination is a form-filling room--
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​

CheckDestFolderWrapper

Authorization​

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

HTTP request headers​

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