Endpoint
/v1/files/{ref}/sample/
GET
Retrieve a random sampling of files, with the probability of being chosen based on by-value property.
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
by-value
Weight the sampling by the value specified: capacity (total bytes used for data and metadata), data (total bytes used for data only), file (file count), named_streams (named stream count):
* `capacity` - capacity,
* `data` - data,
* `file` - file,
* `named_streams` - named_streams
Yes
limit
Maximum number of entries returned
Yes
Response
Codes
Code
Description
200
Return value on success
Schema
{
"type" : "array" ,
"items" : {
"description" : "api_files_aggregates" ,
"type" : "object" ,
"properties" : {
"name" : {
"description" : "Name of this file or directory" ,
"type" : "string"
},
"type" : {
"type" : "string" ,
"enum" : [
"FS_FILE_TYPE_FILE" ,
"FS_FILE_TYPE_DIRECTORY" ,
"FS_FILE_TYPE_SYMLINK" ,
"FS_FILE_TYPE_UNIX_PIPE" ,
"FS_FILE_TYPE_UNIX_CHARACTER_DEVICE" ,
"FS_FILE_TYPE_UNIX_BLOCK_DEVICE" ,
"FS_FILE_TYPE_UNIX_SOCKET"
],
"description" : "type: \n * `FS_FILE_TYPE_DIRECTORY` - FS_FILE_TYPE_DIRECTORY, \n * `FS_FILE_TYPE_FILE` - FS_FILE_TYPE_FILE, \n * `FS_FILE_TYPE_SYMLINK` - FS_FILE_TYPE_SYMLINK, \n * `FS_FILE_TYPE_UNIX_BLOCK_DEVICE` - FS_FILE_TYPE_UNIX_BLOCK_DEVICE, \n * `FS_FILE_TYPE_UNIX_CHARACTER_DEVICE` - FS_FILE_TYPE_UNIX_CHARACTER_DEVICE, \n * `FS_FILE_TYPE_UNIX_PIPE` - FS_FILE_TYPE_UNIX_PIPE, \n * `FS_FILE_TYPE_UNIX_SOCKET` - FS_FILE_TYPE_UNIX_SOCKET"
},
"id" : {
"description" : "Unique ID of this file or directory" ,
"type" : "string"
},
"capacity_usage" : {
"description" : "Capacity used by this file, or directory and all its children, in bytes" ,
"type" : "string"
},
"data_usage" : {
"description" : "Capacity used for data by this file, or directory and all its children, in bytes" ,
"type" : "string"
},
"meta_usage" : {
"description" : "Capacity used for metadata by this file, or directory and all its children, in bytes" ,
"type" : "string"
},
"num_files" : {
"description" : "Total number of files in the directory" ,
"type" : "string"
},
"num_directories" : {
"description" : "Total number of directories in the directory" ,
"type" : "string"
},
"num_symlinks" : {
"description" : "Total number of symlinks in the directory" ,
"type" : "string"
},
"num_other_objects" : {
"description" : "Total number of Unix devices, pipes, and sockets in the directory" ,
"type" : "string"
},
"named_stream_data_usage" : {
"description" : "Capacity used for data by named streams on this file, or directory and all its children, in bytes" ,
"type" : "string"
},
"num_named_streams" : {
"description" : "Total number of named streams in the directory" ,
"type" : "string"
}
}
}
}