Trash

Report the disk space used by the trash directory

Changed on

Report the current apparent size of the trash directory's contents. Returns whether the trash exists, the total apparent bytes calculated by summing each entry's lstat size, and the number of items in the trash. Excludes the root-level .trash_restore bookkeeping file. Does not walk the account's home directory or follow symbolic links outside the trash. even on large accounts.

get/Trash/usage

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Response

HTTP Request was successful.

apiversioninteger
funcstring
modulestring

Example response

{
  "apiversion": 3,
  "func": "usage",
  "module": "Trash",
  "result": {
    "data": {
      "bytes": 4096,
      "exists": 1,
      "items": 3
    },
    "status": 1
  }
}

Changes