Cloud Storage Rename
🔑 Need JWT Authorization
Description
Rename cloud storage file or directory
Method And Path
js
POST /v2/cloud-storage/rename
Request
Header
ts
{
"authorization": string;
"x-request-id": string;
"x-session-id": string;
}
Body
ts
{
"fileUUID": string;
"newName": string;
}
fileUUID
File or directory uuid
- format: uuid-v4
newName
File or directory new name
If target is directory, format is: directory-name
- maxLength:
50
- minLength:
1
Response
Success
HTTP Status Code: 200
ts
{
status: Status.Success,
data: {}
}
Extends Type: Status
Failed
HTTP Status Code: 200
ts
{
status: Status.Failed,
code: ErrorCode
}
Extends Type: Status, ErrorCode
Examples
directory
- oldNew:
a
- newName:
b
- result:
b
file
- oldNew:
a.png
- newName:
b.jpg
- result:
b.jpg.png