PUT api/2.0/files/fileops/move This function requires authentication

Description

Moves all the selected files and folders to the folder with the ID specified in the request.

Parameters
Name Description Type Example
destFolderId
sent in body
Destination folder ID string some text
folderIds
sent in body
List of folder IDs Collection of strings
collection
some text
fileIds
sent in body
List of file IDs Collection of strings
collection
some text
conflictResolveType
sent in body
Overwriting behavior: skip (0), overwrite (1) or duplicate (2) Skip, Overwrite, Duplicate Skip
deleteAfter
sent in body
Specifies whether to delete a folder after the editing session is finished or not Bool value true
Example
PUT api/2.0/files/fileops/move
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "destFolderId": "some text",
  "folderIds": [
    "some text"
  ],
  "fileIds": [
    "some text"
  ],
  "conflictResolveType": "Skip",
  "deleteAfter": true
}
Returns

List of file operations

Example Response

application/json

{
  "status": 0,
  "response": [
    {
      "id": "d5490cba-a5e6-40db-acb2-94203dba12d6",
      "operation": 1,
      "progress": 100,
      "error": "",
      "processed": "1",
      "finished": false,
      "url": null,
      "files": [
        {
          "RootFolderType": 2,
          "UpdatedBy": {
            "Id": "00000000-0000-0000-0000-000000000000",
            "DisplayName": "Mike Zanyatski",
            "Title": "Manager",
            "AvatarSmall": "url to small avatar",
            "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
          },
          "Created": "2020-12-13T17:13:31.5902727Z",
          "CreatedBy": {
            "Id": "00000000-0000-0000-0000-000000000000",
            "DisplayName": "Mike Zanyatski",
            "Title": "Manager",
            "AvatarSmall": "url to small avatar",
            "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
          },
          "Updated": "2020-12-13T17:13:31.5902727Z",
          "ProviderItem": true,
          "ProviderKey": "1234d",
          "ProviderId": 1234,
          "FolderId": 12334,
          "Version": 3,
          "VersionGroup": 1,
          "ContentLength": "12.06 KB",
          "PureContentLength": 12345,
          "FileStatus": 2,
          "ViewUrl": "http:\\/\\/www.onlyoffice.com\\/viewfile?fileid=2221",
          "WebUrl": "http:\\/\\/www.onlyoffice.com\\/viewfile?fileid=2221",
          "FileType": 7,
          "FileExst": ".txt",
          "Comment": null,
          "Encrypted": true,
          "Id": 857864274,
          "Title": "Some titile.txt",
          "Access": 1,
          "Shared": false
        }
      ],
      "folders": [
        {
          "RootFolderType": 2,
          "UpdatedBy": {
            "Id": "00000000-0000-0000-0000-000000000000",
            "DisplayName": "Mike Zanyatski",
            "Title": "Manager",
            "AvatarSmall": "url to small avatar",
            "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
          },
          "Created": "2020-12-13T17:13:31.5902727Z",
          "CreatedBy": {
            "Id": "00000000-0000-0000-0000-000000000000",
            "DisplayName": "Mike Zanyatski",
            "Title": "Manager",
            "AvatarSmall": "url to small avatar",
            "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
          },
          "Updated": "2020-12-13T17:13:31.5902727Z",
          "ProviderItem": true,
          "ProviderKey": "1234d",
          "ProviderId": 1234,
          "ParentId": 1840746475,
          "FilesCount": 1840746475,
          "FoldersCount": 1840746475,
          "IsShareable": true,
          "Id": 857864274,
          "Title": "Some titile.txt",
          "Access": 1,
          "Shared": false
        }
      ]
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>d5490cba-a5e6-40db-acb2-94203dba12d6</id>
    <operation>1</operation>
    <progress>100</progress>
    <error />
    <processed>1</processed>
    <finished>False</finished>
    <url />
    <files>
      <RootFolderType>2</RootFolderType>
      <UpdatedBy>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <DisplayName>Mike Zanyatski</DisplayName>
        <Title>Manager</Title>
        <AvatarSmall>url to small avatar</AvatarSmall>
        <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
      </UpdatedBy>
      <Created>2020-12-13T17:13:31.5902727Z</Created>
      <CreatedBy>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <DisplayName>Mike Zanyatski</DisplayName>
        <Title>Manager</Title>
        <AvatarSmall>url to small avatar</AvatarSmall>
        <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
      </CreatedBy>
      <Updated>2020-12-13T17:13:31.5902727Z</Updated>
      <ProviderItem>True</ProviderItem>
      <ProviderKey>1234d</ProviderKey>
      <ProviderId>1234</ProviderId>
      <FolderId>12334</FolderId>
      <Version>3</Version>
      <VersionGroup>1</VersionGroup>
      <ContentLength>12.06 KB</ContentLength>
      <PureContentLength>12345</PureContentLength>
      <FileStatus>2</FileStatus>
      <ViewUrl>http:\/\/www.onlyoffice.com\/viewfile?fileid=2221</ViewUrl>
      <WebUrl>http:\/\/www.onlyoffice.com\/viewfile?fileid=2221</WebUrl>
      <FileType>7</FileType>
      <FileExst>.txt</FileExst>
      <Comment />
      <Encrypted>True</Encrypted>
      <Id>857864274</Id>
      <Title>Some titile.txt</Title>
      <Access>1</Access>
      <Shared>False</Shared>
    </files>
    <folders>
      <RootFolderType>2</RootFolderType>
      <UpdatedBy>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <DisplayName>Mike Zanyatski</DisplayName>
        <Title>Manager</Title>
        <AvatarSmall>url to small avatar</AvatarSmall>
        <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
      </UpdatedBy>
      <Created>2020-12-13T17:13:31.5902727Z</Created>
      <CreatedBy>
        <Id>00000000-0000-0000-0000-000000000000</Id>
        <DisplayName>Mike Zanyatski</DisplayName>
        <Title>Manager</Title>
        <AvatarSmall>url to small avatar</AvatarSmall>
        <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
      </CreatedBy>
      <Updated>2020-12-13T17:13:31.5902727Z</Updated>
      <ProviderItem>True</ProviderItem>
      <ProviderKey>1234d</ProviderKey>
      <ProviderId>1234</ProviderId>
      <ParentId>1840746475</ParentId>
      <FilesCount>1840746475</FilesCount>
      <FoldersCount>1840746475</FoldersCount>
      <IsShareable>True</IsShareable>
      <Id>857864274</Id>
      <Title>Some titile.txt</Title>
      <Access>1</Access>
      <Shared>False</Shared>
    </folders>
  </response>
</result>