Endpoint
/v1/files/{ref}/copy-chunk
POST
Copies the contents of the source file specified in the body of the request to the default stream. The file must already exist.
Parameters
Name
Description
Required
ref
The file ID or the absolute path to the file system object. File IDs can be found in the id field of responses of APIs that return file attributes. You must URL-encode the paths. The APIs & Tools page in the Qumulo Core Web UI URL-encodes the paths.
Yes
If-Match
ETag for expected version
No
Request
Schema
{
"description" : "api_files_copy_chunk" ,
"type" : "object" ,
"properties" : {
"source_id" : {
"description" : "File ID of the source file. Exactly one of source_id or source_path must be provided." ,
"type" : "string"
},
"source_path" : {
"description" : "Path of the source file. Exactly one of source_id or source_path must be provided." ,
"type" : "string"
},
"source_stream_id" : {
"description" : "Stream ID of the source file. Defaults to default stream." ,
"type" : "string"
},
"source_snapshot" : {
"description" : "Snapshot ID specifying the version of the file to copy from. Defaults to head version." ,
"type" : "number"
},
"source_offset" : {
"description" : "Specifies the offset in bytes to start copying from. Defaults to 0." ,
"type" : "string"
},
"target_offset" : {
"description" : "Specifies the offset in bytes to start copying to. Defaults to 0." ,
"type" : "string"
},
"length" : {
"description" : "Specifies the maximum length of copy in bytes. Defaults to copy to the end of the source file. The server may not be able to copy the entire length requested. If that is the case, the response body returned can be used as request body for the remaining copy." ,
"type" : "string"
},
"source_etag" : {
"description" : "Expected ETag of the source file returned from /v1/files/{source-id}/info/attributes. If provided, this ETag will be validated against the server to ensure no intermediate change has occurred." ,
"type" : "string"
}
}
}
Response
Codes
Code
Description
200
Return value on success
Schema
{
"description" : "api_files_copy_chunk" ,
"type" : "object" ,
"properties" : {
"source_id" : {
"description" : "File ID of the source file. Exactly one of source_id or source_path must be provided." ,
"type" : "string"
},
"source_path" : {
"description" : "Path of the source file. Exactly one of source_id or source_path must be provided." ,
"type" : "string"
},
"source_stream_id" : {
"description" : "Stream ID of the source file. Defaults to default stream." ,
"type" : "string"
},
"source_snapshot" : {
"description" : "Snapshot ID specifying the version of the file to copy from. Defaults to head version." ,
"type" : "number"
},
"source_offset" : {
"description" : "Specifies the offset in bytes to start copying from. Defaults to 0." ,
"type" : "string"
},
"target_offset" : {
"description" : "Specifies the offset in bytes to start copying to. Defaults to 0." ,
"type" : "string"
},
"length" : {
"description" : "Specifies the maximum length of copy in bytes. Defaults to copy to the end of the source file. The server may not be able to copy the entire length requested. If that is the case, the response body returned can be used as request body for the remaining copy." ,
"type" : "string"
},
"source_etag" : {
"description" : "Expected ETag of the source file returned from /v1/files/{source-id}/info/attributes. If provided, this ETag will be validated against the server to ensure no intermediate change has occurred." ,
"type" : "string"
}
}
}