Get Started
Usage API
More information

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

Description

Copies 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
deleteAfter
sent in body
Deletes after finished Bool value true
Example
PUT api/2.0/files/fileops/copy
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

Operation result

Example Response

application/json

{
  "status": 0,
  "response": [
    {
      "id": "68f9fca2-96eb-439f-a046-2163e09dc4ff",
      "operation": 0,
      "progress": 100,
      "error": "",
      "processed": "1",
      "finished": false,
      "url": null,
      "files": [
        {
          "folderId": 12334,
          "version": 3,
          "versionGroup": 1,
          "contentLength": "12.06 KB",
          "pureContentLength": 12345,
          "fileStatus": 2,
          "viewUrl": "http:\/\/www.onlyoffice.com\/viewfile?fileid=2221",
          "fileType": 7,
          "fileExst": ".txt",
          "comment": null,
          "id": 1533953230,
          "title": "Some titile.txt",
          "access": 1,
          "shared": false,
          "rootFolderType": 2,
          "updatedBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "created": "2021-10-25T04:56:29.2995969Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2021-10-25T04:56:29.2995969Z"
        }
      ],
      "folders": [
        {
          "parentId": 1533953230,
          "filesCount": 1533953230,
          "foldersCount": 1533953230,
          "id": 1533953230,
          "title": "Some titile",
          "access": 1,
          "shared": false,
          "rootFolderType": 2,
          "updatedBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "created": "2021-10-25T04:56:29.2995969Z",
          "createdBy": {
            "id": "00000000-0000-0000-0000-000000000000",
            "displayName": "Mike Zanyatski",
            "title": "Manager",
            "avatarSmall": "url to small avatar",
            "profileUrl": ""
          },
          "updated": "2021-10-25T04:56:29.2995969Z"
        }
      ]
    }
  ]
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>68f9fca2-96eb-439f-a046-2163e09dc4ff</id>
    <operation>0</operation>
    <progress>100</progress>
    <error></error>
    <processed>1</processed>
    <finished>false</finished>
    <url />
    <files>
      <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>
      <fileType>7</fileType>
      <fileExst>.txt</fileExst>
      <comment />
      <id>1533953230</id>
      <title>Some titile.txt</title>
      <access>1</access>
      <shared>false</shared>
      <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></profileUrl>
      </updatedBy>
      <created>2021-10-25T04:56:29.2995969Z</created>
      <createdBy>
        <id>00000000-0000-0000-0000-000000000000</id>
        <displayName>Mike Zanyatski</displayName>
        <title>Manager</title>
        <avatarSmall>url to small avatar</avatarSmall>
        <profileUrl></profileUrl>
      </createdBy>
      <updated>2021-10-25T04:56:29.2995969Z</updated>
    </files>
    <folders>
      <parentId>1533953230</parentId>
      <filesCount>1533953230</filesCount>
      <foldersCount>1533953230</foldersCount>
      <id>1533953230</id>
      <title>Some titile</title>
      <access>1</access>
      <shared>false</shared>
      <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></profileUrl>
      </updatedBy>
      <created>2021-10-25T04:56:29.2995969Z</created>
      <createdBy>
        <id>00000000-0000-0000-0000-000000000000</id>
        <displayName>Mike Zanyatski</displayName>
        <title>Manager</title>
        <avatarSmall>url to small avatar</avatarSmall>
        <profileUrl></profileUrl>
      </createdBy>
      <updated>2021-10-25T04:56:29.2995969Z</updated>
    </folders>
  </response>
</result>