Folder

Copies a folder asynchronously. You can use ListFolder to preview the operation using the `dryRun` parameter.

Changed on

Copies a folder asynchronously.

You can use ListFolder to preview the operation using the dryRun parameter.

post/v2/accounts/{accountId}/folders/copy

Request

Path parameters

accountIdstring required

Your account ID.

This is visible on the settings page:

https://www.bytescale.com/dashboard/settings

Example:A623uY2

Request body

copyFilesboolean

If true then copies files.

Default: true

copyOverriddenStorageboolean

If false then if a file's parent folder has overridden storage settings, the file won't be copied.

If you don't use folders with custom storage settings (like AWS S3 buckets), you don't need to worry about this setting.

Conditional: copyVirtualFolders and copyOverriddenStorage cannot both be true.

Default: false

copyVirtualFoldersboolean

If true then copies virtual folders at the current path and below (virtual folders are folders created using the PutFolder operation).

If false then virtual folders will not be copied, meaning no folder settings will be copied to the destination, but the files of any virtual folders will still be copied if copyFiles is set to true.

Conditional: copyVirtualFolders and copyOverriddenStorage cannot both be true.

Default: true

destinationstring required

Absolute path to a folder. Begins with a /. Should not end with a /.

recursiveboolean

If true then copies files and folders that are descendants of the source folder.

If false then only copies files that are direct children of the source folder, and does not copy descendant folders (children or otherwise).

Default: true

sourcestring required

Absolute path to a folder. Begins with a /. Should not end with a /.

Example request

{
  "destination": "/destination/folder",
  "source": "/source/folder",
  "recursive": true
}

Response

Success.

jobDocs'https://www.bytescale.com/docs/job-api/GetJob' required

Link to the documentation that describes how to get a job's status from its job ID.

jobIdstring required

Job ID.

jobType'ProcessImageJob' | 'ProcessVideoJob' | 'ProcessAudioJob' | 'AntivirusJob' | 'ResetCacheJob' | 'DeleteFolderBatchJob' | 'DeleteFileBatchJob' | 'CopyFolderBatchJob' | 'CopyFileBatchJob' required

Job type.

jobUrlstring required

URL for the job's status.

You can GET this URL to retrieve the job's status.

You must authorize your GET request with a secret_* API key when accessing the URL.

Example response

{
  "jobId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "jobUrl": "https://api.bytescale.com/v2/accounts/FW25aki/jobs/ExampleJob/01ARZ3NDEKTSV4RRFFQ69G5FAV"
}

Changes

    • warning

      removed the request property

    • warning

      added the new AntivirusJob enum value to the response property for the response status

    • warning

      added the new ProcessAudioJob enum value to the response property for the response status

    • warning

      added the new ProcessImageJob enum value to the response property for the response status

    • warning

      added the new ProcessVideoJob enum value to the response property for the response status

    • warning

      added the new ResetCacheJob enum value to the response property for the response status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      removed the ProcessFileJob enum value from the response property for the response status