Home

/reports/data/diskusage/get_latest_reports
/reports/data/diskusage/get_latest_reports?task_name=small_files_report

Gets the latest small file report.

Request
GET http://unravel-host:3000/api/v1/reports/data/diskusage/get_latest_reports?task_name=small_files_report
Path Parameters

None.

Query Parameters

Name

Type

Description

task_name

string

Task name. Set this to small_files_report.

Response Fields
{
  "date": date created EPOCH_timestamp,
  "isSuccess": report generation sucess/failure,

// report parameters
  "avg_size_threshold": small file size in bytes,
  "num_files_threshold": minimum number of small files,
  "top_n_small_files": # of directories to show,

  "report_id": report name",
  "root": [
    // array[top_n_small files] directory
    {
      "MaxFilesize": maximum size file in directory,
      "MinFilesize": minimum size file in directory,
      "NumFiles": # of small files in the directory,
      "DirPath": directory path,
      "TotalFilesize": sum of file size in directory,
      "AvgFilesize": average file size
    }
  ]
}
Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/reports/data/diskusage/get_latest_reports?task_name=small_files_report" -H  "accept: application/json" -H  "Authorization: JWT token"

Response:

{
  "date": 1536899695,
  "isSuccess": true,
  "avg_size_threshold": 100000,
  "num_files_threshold": 100,
  "top_n_small_files": 5,
  "report_id": "small_files_1536927781_5674",
  "root": [
    {
      "MaxFilesize": "0",
      "MinFilesize": "0",
      "NumFiles": "21523359",
      "DirPath": "\/97ovg",
      "TotalFilesize": "0",
      "AvgFilesize": "0"
    },
    {
      "MaxFilesize": "0",
      "MinFilesize": "0",
      "NumFiles": "11302185",
      "DirPath": "\/98esm",
      "TotalFilesize": "0",
      "AvgFilesize": "0"
    },
    {
      "MaxFilesize": "0",
      "MinFilesize": "0",
      "NumFiles": "7174452",
      "DirPath": "\/99acx",
      "TotalFilesize": "0",
      "AvgFilesize": "0"
    },
    {
      "MaxFilesize": "0",
      "MinFilesize": "0",
      "NumFiles": "7174452",
      "DirPath": "\/97ovg\/97zqu",
      "TotalFilesize": "0",
      "AvgFilesize": "0"
    },
    {
      "MaxFilesize": "0",
      "MinFilesize": "0",
      "NumFiles": "7174452",
      "DirPath": "\/97ovg\/99kgg",
      "TotalFilesize": "0",
      "AvgFilesize": "0"
    }
  ]
}