Drive > Files > Trash

Count directories/files in trash

Changed on

Count the number of directories and files

get/3/drive/{drive_id}/trash/{file_id}/count

Request

  • Base URL
    https://api.infomaniak.com
  • URL
    https://api.infomaniak.com/3/drive/{drive_id}/trash/{file_id}/count
  • Auth
    HTTP bearer

Path parameters

drive_idinteger required

the drive identifier

file_idstring required

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

result'success' | 'error' | 'asynchronous' required

Result of the HTTP request

Example response

{
  "result": "success",
  "data": {
    "count": 10,
    "files": 6,
    "directories": 4
  }
}

Changes

    • warning

      added the new forbidden_error enum value to the // response property for the response status