Move multiple files and folders

This call lets you perform a bulk move operation of files and folders. You can move files or folders:

  • to a root project folder
  • to a subfolder within the same project or a different project

Rules for moving files and folders

  • The file ID is preserved after the move.
  • The folder ID is changed after the move.
  • The destination has to be an existing folder.
  • If the target folder contains a folder with the same name, the contents of both folders will be merged.
  • If a file with the same name already exists, the source file will be automatically renamed (by adding a numeric prefix).
  • You need to have WRITE permissions for both the source and destination folders.

📘

If you are using Seven Bridges Platform EU, please use the following endpoint: https://eu-api.sbgenomics.com/v2/async/files/move

Example request body

{
  "items": [
    {
      "file": "5c6d3c30e4b038363238932f",
      "parent": "2c6d3b11e9b038533235932g",
      "project": "",
      "name": "my-new-file"
    },
    {
      "file": "5c6d3c30e4b038363238932e",
      "parent": "2c6d3b11e9b038533235932g",
      "name": ""
    },
    {
      "file": "5c6d3c30e4b0383632389331",
      "parent": "85c6d3f32c4b038533235932h",
      "name": ""
    }
  ]
}

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Response body

KeyData type of valueDescription of value
typestringThe type of job, which is MOVE in the case of copying files.
total_filesstringThe total number of files which will be processed. You can obtain this information using the call for getting the details of a move job.
statestringThe state is SUBMITTED at the time of making this call.
resultstringThis key will show the result if available at the time the call is made. Use the details of a move job to see more information.
idstringID of this move job.
failed_filesstringThe number of failed files if that information is available at the time of the call. You can get details of a move job with a dedicated call.
completed_filesstringThe number of completed files if that information is available at the time of the call. You can get details of a move job with a dedicated call.
Language