Skip to main content
Hitachi Vantara Knowledge

Submit a tree clone job of a file system directory

Submits a tree clone job of a file system directory.

HTTP request syntax (URI)
POST <base_URI>/v8/storage/filesystems/{filesystemId}/clone-jobs
Parameters
Name Type Required Values Description
filesystemId URI_PARAM Y string Either the file system object ID or HNAS file system ID.
srcDirectory BODY Y string Source directory absolute path of the tree clone job. The path should be in UNIX format.
dstDirectory BODY Y string Destination directory absolute path of the tree clone job. The path should be in UNIX format.
ensureCreate BODY Y boolean Whether to create the destination directory path if it does not exist. When it is false and the destination directory path exists, the operation results in failure.
Return codes
Code Data Description
201 jobId File system directory clone job has been successfully submitted. The value is the ID of the tree clone job.
400 Error Message Missing or invalid request contents.
403Error MessageOperation forbidden by access level.
404 Error Message Requested resource not found.
500 Error message Error associated with the storage system.

Any HTTP status code other than 201 indicates that the API did not complete successfully.

Request example 1: Submit tree clone job using the file system object ID
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.57.75:8444/v8/storage/filesystems/4141453043393746413838393331303630303030303030303030303030303030/clone-jobs -d ‘{"srcDirectory":"/xyz-src-directory", "dstDirectory":"/xyz-create-directory-0825-submit-tree-clone-job-dest", "ensureCreate": true}’ -X POST
Request example 2: Submit tree clone job using the HNAS storage file system ID
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.57.75:8444/v8/storage/filesystems/864DC6E1DFB68C210000000000000000/clone-jobs -d ‘{"srcDirectory":"/xyz-src-directory", "dstDirectory":"/xyz-create-directory-0825-submit-tree-clone-job-dest", "ensureCreate": true}’ -X POST
Response example: Both requests produce the same response
HTTP/1.1 201 Created  
{
  "jobId" : "3019a7b6-f590-11d0-91bb-4bee3faaca3b",
  "uri" : "https://172.17.57.75:8444/v8/storage/filesystems/clone-jobs/3019a7b6-f590-11d0-91bb-4bee3faaca3b"
}

 

  • Was this article helpful?