Copy a file
Copy a file to another folder in the same portal. For example, copy the file IMG_0002.PNG from the folder “New” under “My Files” to be under “My Files/Test”.
Note: The destination folder must be in the same portal as the source folder.
API
ServicesPortal/api
URI
http://portal_url/ServicesPortal/api where portal_url is the URL of the team portal.
HTTP Method
POST
Request Content-Type
application/xml
Request body example
<obj >
  <att id="name">
    <val>moveResources</val>
  </att>
  <att id="param">
    <obj class="ActionResourcesParam">
      <att id="urls">
        <list>
          <obj class="SrcDstParam">
            <att id="src">
              <val>source_file_path_&_name</val>
            </att>
            <att id="dest">
              <val>target_file_path_&_name</val>
            </att>
          </obj>
        </list>
      </att>
      <att id="passphrase"/>
      <att id="userPassword"/>
      <att id="startFrom"/>
    </obj>
  </att>
</obj>
Expected Response status
200 OK
The request body:
src – Mandatory: The path and name of the file to copy. For example, /ServicesPortal/webdav/myfiles/New/IMG_0002.PNG
dest – Mandatory: The destination path and name of the file. For example, /ServicesPortal/webdav/myfiles/test/New/IMG_0002.PNG
Note: If you change the target name of the file it is renamed. See Rename a file.
If a folder in the path does not exist, the operation fails.
passphrase – The passphrase for the user. The passphrase is not encrypted.
userPassword – The password for the user. The password is not encrypted.
startFrom – The position to restart the operation if it was stopped before completion.