Endpoint
Authentication
Requires Bearer token authentication via theAuthorization header.
Path Parameters
The UUID of the server
Request Body
The root directory for the rename operations (all paths are relative to this)
Array of file rename operations
Response
Returns204 No Content on success.
Example Request
Behavior
- Operations are performed concurrently for better performance
- Both files and directories can be renamed/moved
- Moving to a different directory requires the full path in the
tofield - If the source file doesn’t exist, the operation is skipped (no error)
- Parent directories in the destination path are created automatically
- Ignored files (
.pteroignore) cannot be renamed or moved - Path traversal is prevented
Error Responses
400 Bad Request
400 Bad Request
Destination file already exists
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
File is on the ignore list or path traversal attempt
404 Not Found
404 Not Found
Server does not exist
422 Unprocessable Entity
422 Unprocessable Entity
Empty files array provided
500 Internal Server Error
500 Internal Server Error
Failed to rename file (permission error, etc.)
Use Cases
- Rename configuration files
- Move files between directories
- Organize server files into folders
- Create backup copies (rename to .bak)
- Batch rename operations
Source Reference
Implementation:router/router_server_files.go:94-158 (putServerRenameFiles function)