Skip to main content

Copy objects

POST 

/v1/storages/copy-objects

Note: This interface can only be called by administrators.

Batch copy specified objects to the target path, with optional parameters to control whether to overwrite existing objects with the same name at the target path or delete the original objects after copying.

Request

Body

arrayrequired

Batch copy object request parameters, array format

  • Array [
  • srcPath Absolute path of the source object, including the file name. For example, foo/bar.jpg, foo/bar/baz.jpg, etc. Cannot contain characters other than [0-9, a-z, A-Z], /, !, -, _, ., , *, and Chinese characters (string)required
    dstPath Absolute path of the destination object, including the file name. For example, foo/bar.jpg, foo/bar/baz.jpg, etc. Cannot contain characters other than [0-9, a-z, A-Z], /, !, -, _, ., , *, and Chinese characters; the destination path must not be the same as the source path (string)required
    overwrite Whether to allow overwriting existing objects when the destination object already exists, default is true (boolean)

    Default value: true

    removeOriginal Whether to delete the original object after copying, default is false (boolean)
  • ]

Responses

Returned when the call is successful

Response Headers
  • X-Request-Id string

    Request ID

Schema
  • Array [
  • oneOf
    cloudObjectId Cloud file ID after copying (string)
  • ]
Loading...