Drive > Files > File/Directory
Count element in directory
Get number of element in a directory by ID
get/3/drive/{drive_id}/files/{file_id}/count
Path parameters
drive_idinteger required
Drive identifier
file_idinteger required
File identifier
Query parameters
depth'folder' | 'unlimited'
Specifies how elements are counted within given folder. Choose either to count only within the specified folder (folder) or to include subfolders in the count (unlimited). The default mode is folder.<ul><small><li><strong>folder:</strong> Count elements only in the specified folder, excluding subfolders.</li><li><strong>unlimited:</strong> Count elements in the specified folder and all subfolders.</li></small></ul>
Response
OK
Example response
{
"result": "success",
"data": {
"count": 10,
"files": 6,
"directories": 4
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.