Cloud-based Excel File Efficient Management Solution – Interface for Fast Moving of Files in the Cloud
Excel API: Move File
Web API
PUT https://api.aspose.cloud/v4.0/cells/storage/file/move/{srcPath}
Function Description
The moveFile API moves a file from one location to another within Aspose.Cells Cloud storage. It helps you organize files and manage storage efficiently.
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
-H "Authorization: Bearer {access_token}"
The request parameters of moveFile API are
| Parameter Name | Type | Path/Query String/HTTP Body | Description |
|---|---|---|---|
| srcPath | String | Path | The source path of the file to be moved. |
| destPath | String | Query | The destination path where the file will be moved. |
| srcStorageName | String | Query | The source storage name, if applicable. |
| destStorageName | String | Query | The destination storage name, if applicable. |
| versionId | String | Query | The version ID of the file, if applicable. |
Response Description
A successful request returns HTTP 200 OK with an empty JSON body.
{}
Possible HTTP status codes
| Status Code | Description |
|---|---|
| 200 OK | File moved successfully. |
| 400 Bad Request | Invalid request parameters. |
| 401 Unauthorized | Authentication failed. |
| 404 Not Found | Source file not found. |
| 500 Internal Server Error | Server error. |
cURL example
curl -X PUT "https://api.aspose.cloud/v4.0/cells/storage/file/move/{srcPath}?destPath={destPath}" \
-H "Authorization: Bearer {access_token}"
Example error payload
{
"error": "File not found",
"code": 404,
"message": "The specified source file does not exist."
}
OpenAPI Specification
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
Excel API SDK
Using an SDK is the best way to speed up the development. An SDK takes care of low‑level details and lets you focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to make calls to Aspose.Cells web services using various SDKs:
C# example
using Aspose.Cells.Cloud.SDK.Api;
using Aspose.Cells.Cloud.SDK.Model.Requests;
var apiInstance = new CellsApi("client_id", "client_secret");
var request = new MoveFileRequest(srcPath, destPath);
apiInstance.MoveFile(request);
Python example
from asposecellscloud import CellsApi, MoveFileRequest
api_instance = CellsApi(client_id="client_id", client_secret="client_secret")
request = MoveFileRequest(src_path=src_path, dest_path=dest_path)
api_instance.move_file(request)
See also: Copy File, Delete File