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.
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. |