Skip to main content

GetUserStorageStat

July 21, 2025

This API allows you to get the file statistic of a backup set of a user.

The settings can be found on the AhsayCBS web console at:

  • Backup / Restore > Users, Groups & Policies > Backup User > %User Name% > Statistics

 

URL

https://CBS.EXAMPLE.COM/obs/api/json/GetUserStorageStat.do

Available Since Version: 9.1

Parameters

Key Type Description
SysUser String Username of an AhsayCBS System User with Admin or API role.
SysPwd String Password matching SysUser.
LoginName String Name of the backup user.
Owner String The owner of backup user (if applicable).
YearMonth String In "yyyy-MM" format. For example, to get the storage statistics of January 2024, the parameter is "2024-01".
BackupSetID String "all" to get statistics of all backup sets or the backup set ID for a specific backup set.
Return Values
Key Type Description
Status String "OK" or "Error"
Data Array of AverageStat Array list of AverageStat settings.
Message String Error message, it only appears if status displays "Error".
ExptType String The type of exception, it appears only if status is "Error".
JSON Objects

AverageStat

Key Type Description
YearMonth String The year and month in yyyy-MM format.
AvgDataSize String Average data size in k/M/G format of all backup sets.
AvgDataRawSize String Average data size in raw byte format of all backup sets.
AvgDataNo String Average data number.
AvgRetainSize String Average retained data size in k/M/G format of all backup sets.
AvgRetainRawSize String Average retained data size in raw byte format of all backup sets.
AvgRetainNo String Average retain number.
AvgUploadSize String Average uploaded data size in k/M/G format of all backup sets.
AvgUploadRawSize String Average uploaded data size in raw byte format of all backup sets.
AvgUploadNo String Average upload number.
AvgTotalStorageSize String Average total storage size in k/M/G format of all backup sets.
AvgTotalStorageRawSize String Average total storage size in raw byte format of all backup sets.
AvgTotalStorageNo String Average total storage number.
Storage Array of DetailStat Refer to DetailStat.

DetailStat

Key Type Description
Date String The date in yyyy-MM-dd format.
DataSize String Data size in k/M/G format.
DataRawSize String Data size in raw byte format.
DataUncompressed Long Uncompressed data size in k/M/G format.
DataRawUncompressed Long Uncompressed data size in raw byte format.
DataNo String Data number.
RetainSize String Retained data size in k/M/G format.
RetainRawSize String Retained data size in raw byte format.
RetainUncompressed String Uncompressed retained data size in k/M/G format.
RetainRawUncompressed String Uncompressed retained data size in raw byte format.
RetainNo String Retain number.
UploadSize String Uploaded data size in k/M/G format.
UploadRawSize String Uploaded data size in raw byte format.
UploadUncompressed String Uncompressed uploaded data size in k/M/G format.
UploadRawUncompressed String Uncompressed uploaded data size in raw byte format.
UploadNo String Upload number.
TotalStorageSize String Total storage size in k/M/G format.
TotalStorageRawSize String Total storage size in raw byte format.
TotalStorageUncompressed String Uncompressed total storage size in k/M/G format.
TotalStorageRawUncompressed String Uncompressed total storage size in raw byte format.
TotalStorageNo String Total storage number.
DestinationID String Destination storage ID.
Examples

Example 1

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"LoginName":"obm",
	"YearMonth":"2024-06"
}

OUTPUT

{
	"Status":"OK",
	"Data":{
		"AvgDataRawSize":"5504624",
		"AvgUploadRawSize":"5504624",
		"AvgRetainRawSize":"0",
		"AvgRetainUncompressed":"0",
		"AvgTotalStorageUncompressed":"0",
		"AvgUploadSize":"5.25 M",
		"AvgDataRawUncompresed":"5.9 M",
		"AvgDataUncompressed":"5.9 M",
		"AvgRetainSize":"0",
		"AvgTotalStorageSize":"5.25 M",
		"AvgTotalStorageRawUncompressed":"6183694",
		"AvgUploadUncompressed":"5.9 M",
		"AvgUploadNo":"53",
		"AvgTotalStorageNo":"39",
		"Storage":[
			{
				"UploadRawSize":"5504624",
				"TotalRestoreSize":0,
				"DataRawUncompressed":"6183694",
				"DataUncompressed":"5.9 M",
				"UploadRawUncompressed":"6183694",
				"TotalStorageNo":"39",
				"UploadNo":"39",
				"UploadSize":"5.25 M",
				"DataSize":"5.25 M",
				"TotalStorageRawSize":"5504624",
				"RetailRawUncompressed":"0",
				"TotalRestoreFileNo":"0",
				"TotalBackupSize":"5.25 M",
				"RetainUncompressed":"0",
				"TotalStorageUncompressed":"5.9 M",
				"RetainSize":"0",
				"RetainRawSize":"0",
				"DestinationID":"",
				"Date":"2024-06-14",
				"TotalStorageSize":"5.25 M",
				"RetainNo":"0",
				"UploadUncompressed":"5.9 M",
				"TotalStorageRawUncompressed":"6183694",
				"DataNo":"39",
				"TotalBackupFileNo":"39",
				"DataRawSize":"5504624"
			}
		],
		"YearMonth":"2024-06",
		"AvgUploadRawUncompressed":"6183694",
		"AvgRetainRawUncompressed":"0",
		"AvgRetainNo":"0",
		"AvgTotalStorageRawSize":"5504624",
		"AvgDataNo":"39"
	}
}

Example 2: No storage log found

INPUT

{
	"SysUser":"system",
	"SysPwd":"system1",
	"LoginName":"obm",
	"YearMonth":"2024-01"
}

OUTPUT

{
	"Status":"Error",
	"Message":"No storage log found",
	"ExptType":"com.ahsay.obs.core.dbs.DbsException"
}