POST api/2.0/files/file/{fileId}/copyas This function requires authentication

Description

Copies (and converts if possible) an existing file to the specified folder.

Parameters
Name Description Type Example
fileId
sent in url
File ID number 1234
DestTitle
sent in body
Destination file title System.String
DestFolderId
sent in body
Destination folder ID System.Int32
EnableExternalExt
sent in body
Specifies whether to allow the creation of external extension files or not System.Boolean
Password
sent in body
Password System.String
Example
POST api/2.0/files/file/1234/copyas
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "DestTitle": "some text",
  "DestFolderId": 1234,
  "EnableExternalExt": true,
  "Password": "some text"
}
Returns

Copied file entry information

Example Response

application/json

{
  "status": 0,
  "response": {
    "Title": "some text",
    "Access": "ReadWrite",
    "Shared": true,
    "CreatedBy": {
      "Id": "9924256A-739C-462b-AF15-E652A3B1B6EB",
      "DisplayName": "some text",
      "Title": "some text",
      "AvatarSmall": "some text",
      "ProfileUrl": "some text",
      "HasAvatar": true
    },
    "UpdatedBy": {
      "Id": "9924256A-739C-462b-AF15-E652A3B1B6EB",
      "DisplayName": "some text",
      "Title": "some text",
      "AvatarSmall": "some text",
      "ProfileUrl": "some text",
      "HasAvatar": true
    },
    "ProviderKey": "some text"
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Title>some text</Title>
    <Access>ReadWrite</Access>
    <Shared>True</Shared>
    <CreatedBy>
      <Id>9924256A-739C-462b-AF15-E652A3B1B6EB</Id>
      <DisplayName>some text</DisplayName>
      <Title>some text</Title>
      <AvatarSmall>some text</AvatarSmall>
      <ProfileUrl>some text</ProfileUrl>
      <HasAvatar>True</HasAvatar>
    </CreatedBy>
    <UpdatedBy>
      <Id>9924256A-739C-462b-AF15-E652A3B1B6EB</Id>
      <DisplayName>some text</DisplayName>
      <Title>some text</Title>
      <AvatarSmall>some text</AvatarSmall>
      <ProfileUrl>some text</ProfileUrl>
      <HasAvatar>True</HasAvatar>
    </UpdatedBy>
    <ProviderKey>some text</ProviderKey>
  </response>
</result>