- Site
- Session
- User
- Callback
- Workflow
- File
- Permission
- Upload
- Pin
- Version
- Direct Link
- List filesGET
- List file activitiesGET
- Get file infoGET
- Get thumbnail URLGET
- Update file contentPUT
- Create viewer sessionPUT
- Create filePOST
- Rename filePOST
- Move or copy filesPOST
- Create download URLPOST
- Restore from trash binPOST
- Delete fileDELETE
- Force unlockDELETE
- Patch metadataPATCH
- Mount storage policyPATCH
- Update view settingPATCH
- Share
- VAS
- Group
- WebDAV
Rename file
POST
/file/rename
Auth: JWT Optional
Request
Authorization
Add the parameter
Authorization
to Headers,whose value is to concatenate the Token after the Bearer.Example:
Authorization: Bearer ********************
Header Params
X-Cr-Purchase-Ticket
string
optional
Example:
1f63aa26-edc0-40ce-950a-cb4d4323158e
Body Params application/json
type
enum<integer>
required
Allowed values:
01
id
string
required
name
string
required
metadata
with name sys:restore_uri
, which can be parsed as a URI.Example:
btn_google_signin_dark_normal_web@2x.png
permission
string | null
optional
null
, all permissions are granted.Permission definition can be found at File Permissions
created_at
string <date-time>
required
Example:
2025-05-24T10:55:22+08:00
updated_at
string <date-time>
required
Example:
2025-05-24T10:55:22+08:00
size
integer
required
Example:
7536
path
string
required
Example:
cloudreve://my/%E9%97%A8%E7%A5%A8/btn_google_signin_dark_normal_web%402x.png
owned
boolean
required
primary_entity
string | null
optional
Example
{
"uri": "cloudreve://my/Inspirations/old.txt",
"new_name": "new.txt"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/file/rename' \
--header 'X-Cr-Purchase-Ticket: 1f63aa26-edc0-40ce-950a-cb4d4323158e' \
--header 'Content-Type: application/json' \
--data-raw '{
"uri": "cloudreve://my/Inspirations/old.txt",
"new_name": "new.txt"
}'
Responses
🟢200Success
application/json
Body
data
object
required
code
integer
required
0
- Success.Default:
0
Example:
0
msg
string
optional
error
string | null
optional
correlation_id
string <uuid> | null
optional
Example:
b4351ecc-ee1a-4455-bc94-2c3dbcc58538
Example
{
"code": 0,
"data": {
"type": 0,
"id": "rpGq9ds5",
"name": "new.txt",
"permission": null,
"created_at": "2025-05-24T14:17:08+08:00",
"updated_at": "2025-05-24T14:29:13+08:00",
"size": 0,
"metadata": null,
"path": "cloudreve://my/Inspirations/new.txt",
"capability": "39/9",
"owned": true,
"primary_entity": "zOie"
},
"msg": ""
}
Modified at 2025-06-27 03:16:26