Skip to content
On this page

List largest files

Endpoint

GET /v1/filestructure/largestfiles?directorypath={directorypath}&filelimit={filelimit}&pathsize={pathsize}

Returns a list of the largest files, including all subdirectories, within a specific directory

WARNING

The directories "/opt", "/usr", "/proc", "/sys", "/var", "/dev", "/etc", "/sbin", "/bin", and "/lib" will be excluded from the search for performance reasons


Path Parameters


directorypath REQUIRED no type

A given directory from which to locate and retrieve the largest files

filelimit REQUIRED type INTEGER

The maximum number of files to retrieve

pathsize REQUIRED type INTEGER

Size of the directory that is being examined (eg. directorypath)

Responses

json
{
   "directoryPath":{
      "type":"string"
   },
   "structure":{
      "type":"object",
      "properties":{
         "name":{
            "type":"string"
         },
         "path":{
            "type":"string"
         },
         "parent":{
            "type":"object",
            "properties":{
               "name":{
                  "type":"string"
               },
               "path":{
                  "type":"string"
               },
               "parent":"{ etc... }",
               "size":"int64",
               "isDir":"bool",
               "files":"{ etc... }"
            }
         },
         "size":"int64",
         "isDir":"bool",
         "files":"{ etc... }"
      }
   },
   "largestFiles":{
      "type":"array",
      "items":{
         "type":"object",
         "properties":{
            "name":{
               "type":"string"
            },
            "path":{
               "type":"string"
            },
            "parent":"{ etc... }",
            "size":"int64",
            "isDir":"bool",
            "files":"{ etc... }"
         }
      }
   }
}