usage.storage.history
The usage.storage.history command gets historical storage usage statistics.
Historical storage usage statistics can be requested by specifying the following:
-
A definite time period using a start and end date
-
A time period defined by the last period of time style query (for example,last:24h)
TR50 Request
// Definite time period request
{
"get": {
"command": "usage.storage.history",
"params": {
"includeSubOrgs": false,
"showAll": false,
"start": "2014-03-27T00:00:00.000-00:00",
"end": "2014-03-28T00:00:00.000-00:00"
}
}
}
// Last Period of time request
{
"get": {
"command": "usage.storage.history",
"params": {
"includeSubOrgs": false,
"showAll": false,
"last": "10h"
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
includeSubOrgs |
Boolean |
|
If sub-organization totals should be included in the results. |
showAll |
Boolean |
|
If all organizations should be included in the results. Requires Super-Ops. |
One of the following parameters is required. The start and end parameters are used together to specify the time window. |
|||
last |
String |
Yes |
Valid time units are seconds (s), minutes (m), hours (h), or days (d). |
start |
String |
|
When doing a definite time period request this is the timestamp for the start of the specified time window. Used together with end to define the time period. |
end |
String |
|
When doing a definite time period request this is the timestamp for the end of the specified time window. Used together with start to define the time period. |
TR50 Response
{
"get": {
"success": true,
"params": {
"counters": {
"aggregates": [ 16352, 16352, 16352, 16352, 16352, ... ],
...
},
"total": 490560,
"ts": ["2014-01-20T08:00:00-05:00", "2014-01-20T09:00:00-05:00", "2014-01-20T10:00:00-05:00", "2014-01-20T11:00:00-05:00", ... ]
}
}
}
Response Parameters
Name |
Type |
Description |
---|---|---|
counters |
Object |
An object, keyed by the name of the data, that has an array expressing the size of the data during the time period in the corresponding position in the ts array below. |
total |
Integer |
The total of all values in the counter object structure. |
ts |
Array |
An array of the timestamps associated with the counter values. |