Move or Rename File

post

/files/actions/move

Either moves a file from source to destination or renames a file or folder. Moving a folder is not supported. Renaming a folder is supported only if the folder is not in the applications directory.

Request

Query Parameters
  • Overwrite existing file. Only applicable for moving or renaming a file.

Back to Top

Response

200 Response

OK

The file operation completed successfully.

400 Response

Bad Request

Logged in user may not have appropriate permissions.

500 Response

Internal Server Error.

Back to Top

Examples

The following example shows how to move a file from a source path to a destination path in the Essbase file catalog. You can also use this endpoint to rename a file.

This example uses cURL to access the REST API from a Windows shell script. The calling user's ID and password are variables whose values are set in properties.bat.

Script with cURL Command

call properties.bat
curl -X POST "https://myserver.example.com:9001/essbase/rest/v1/files/actions/move?overwrite=true" -H "Accept: application/json" -H "Content-Type:application/json" -d '{"from": "/users/ksmith/sample.zip" , "to": "/shared/sample_shared.zip"}' -u %User%:%Password%

Example of Response Body

A response is returned only if there is an error.

{
  "errorMessage" : "Specified path '/users/ksmith/sample.zip' does not exist"
}
Back to Top