Cloud Enterprise Object Storage REST API

Search (SHIFT+S)




Rename Object

POST /rest/namespace/path?{rename}

Renames a file or a directory within its current namespace. Requires the "x-emc-path" custom header to provide the full path to the new file or directory name. If the new name passed in on the "x-emc-path" header is in Unicode format, the client application must percent-encode the data, and include the "x-emc-utf8" header on the request. Use the optional "x-emc-force" header to specify whether the operation should overwrite the target file or directory if it already exists. To overwrite the target file or directory (if it already exists), set "x-emc-force" to true. If "x-emc-force" is not specified or set to false, the target file will not be overwritten and the rename operation will fail. A directory must be empty to be overwritten. This operation is not supported in the object interface. It returns an error code 1042 if attempted.

URL Format

/rest/namespace/path?{rename}


Query Parameters

rename

Request Headers

"x-emc-date" or "Date" required
"x-emc-path" required
"x-emc-force" optional
"x-emc-uid" required
"x-emc-signature" required
"x-emc-utf8" requiredOnly required when the x-emc-path data is in Unicode format.

Request Payload

No Request Payload


Response Body


XML Example

Request
POST /rest/namespace/dir/custnames?rename HTTP/1.1
   date: Wed, 06 Jan 2010 16:12:09 GMT
   x-emc-date: Wed, 06 Jan 2010 16:12:09 GMT
   x-emc-path: dir/custinfo
   x-emc-force: true
   x-emc-uid: 47cadb22de2e46328e49bafc02f64637/user1
   x-emc-signature: snxbvMmc4vyCm/b+XsDje30coSs=
Response
HTTP/1.1 200 OK
   Date: Wed, 06 Jan 2010 16:12:09 GMT
   Server: Apache
   x-emc-policy: _int
   Content-Length: 0
   Connection: close
   Content-Type: text/plain; charset=UTF-8