移动文件或文件夹。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
POST /v2/file/move HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| domain_id |
string |
是 |
||
| body |
object |
否 |
请求体参数。 |
|
| drive_id |
string |
是 |
空间 id |
1 |
| file_id |
string |
是 |
文件 id |
9520943DC264 |
| to_parent_file_id |
string |
是 |
目的父文件夹 id,当移入根目录时,填 root |
6520943DC261 |
| check_name_mode |
string |
否 |
同名文件处理模式,可选值如下: ignore:允许同名文件; auto_rename:当发现同名文件时,云端自动重命名,默认为追加当前时间点,如 xxx_20060102_150405; refuse:当云端存在同名文件时,拒绝创建新文件,返回客户端已存在同名文件的详细信息。 默认为 ignore |
ignore |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| domain_id |
string |
域 id |
bj1 |
| drive_id |
string |
空间 id |
1 |
| file_id |
string |
文件 id |
fileid1 |
| async_task_id |
string |
异步任务 id。 如果返回为空字符串,表示直接移动成功。 如果返回非空字符串,表示需要经过异步处理。调用 GetAsyncTask,传递异步任务 id,获取任务信息。 |
23ebd1a24dba4166b1527add476ef2866051b4d5del106 |
| exist |
boolean |
文件是否已存在 |
false |
| revision_id |
string |
||
| file_name |
string |
||
| updated_at |
string |
示例
正常返回示例
JSON格式
{
"domain_id": "bj1",
"drive_id": "1",
"file_id": "fileid1",
"async_task_id": "23ebd1a24dba4166b1527add476ef2866051b4d5del106",
"exist": false,
"revision_id": "",
"file_name": "",
"updated_at": ""
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。