Moves files or folders.
Debugging
Authorization information
Request syntax
POST /v2/file/move HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| body | object | No | The request parameters. | |
| drive_id | string | Yes | The drive ID. | 1 |
| file_id | string | Yes | The file ID. | 9520943DC264 |
| to_parent_file_id | string | Yes | The ID of the destination parent directory to which you want to move a file or folder. If you want to move a file or folder to the root directory, set this parameter to root. | 6520943DC261 |
| check_name_mode | string | No | The processing method that is used if the file that you want to move has the same name as an existing file in the destination directory. Valid values: ignore: allows you to move the file by using the same name as an existing file in the destination directory. auto_rename: automatically renames the file that has the same name exists in the destination directory. By default, the current point in time is added to the end of the file name. Example: xxx_20060102_150405. refuse: does not move the file that you want to move but returns the information about the file that has the same name in the destination directory. Default value: ignore. | ignore |
Response parameters
Examples
Sample success responses
JSONformat
{
"domain_id": "bj1",
"drive_id": 1,
"file_id": "fileid1",
"async_task_id": "23ebd1a24dba4166b1527add476ef2866051b4d5del106",
"exist": false
}Error codes
For a list of error codes, visit the Service error codes.
