Create a clone of the file
- PDF of this doc site
Collection of separate PDF docs
Creating your file...
POST /storage/file/clone
Creates a clone of the file.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. |
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned. |
Request Body
Name | Type | Description |
---|---|---|
autodelete |
boolean |
Mark clone file for auto deletion. |
destination_path |
string |
Relative path of the clone/destination file in the volume. |
is_backup |
boolean |
Mark clone file for backup. |
overwrite_destination |
boolean |
Destination file gets overwritten. |
range |
array[string] |
List of block ranges for sub-file cloning in the format "source-file-block-number:destination-file-block-number:block-count" |
source_path |
string |
Relative path of the source file in the volume. |
volume |
Example request
{
"destination_path": "dest_file1, dir1/dest_file2",
"range": [
36605,
73210
],
"source_path": "src_file1, dir1/src_file2, ./.snapshot/snap1/src_file3",
"volume": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
}
Response
Status: 202, Accepted
Name | Type | Description |
---|---|---|
job |
Example response
{
"job": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"uuid": "string"
}
}
Error
Status: Default, Error
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
volume
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the volume. |
uuid |
string |
Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.
|
file_clone
File clone
Name | Type | Description |
---|---|---|
autodelete |
boolean |
Mark clone file for auto deletion. |
destination_path |
string |
Relative path of the clone/destination file in the volume. |
is_backup |
boolean |
Mark clone file for backup. |
overwrite_destination |
boolean |
Destination file gets overwritten. |
range |
array[string] |
List of block ranges for sub-file cloning in the format "source-file-block-number:destination-file-block-number:block-count" |
source_path |
string |
Relative path of the source file in the volume. |
volume |
job_link
Name | Type | Description |
---|---|---|
_links |
||
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |