Get Top N Stats Of Resources
DescriptionGet the Top-N stats data for one or more Resources and a set of StatKeys
Request
URLURL
Query Parameters
Query Parameters
The beginning date as a long value of the range of stats to return Value measures the number of milliseconds since January 1, 1970 00:00:00 UTC NOTE: If not provided, 24 hour rearward of ending date is used
Indicates whether to report only “current” stat values, i.e. skip the stat-s that haven’t published any value during recent collection cycles.
Indicates that the requested stats are based on some dynamic threshold. Defaults to false which indicates that stats are not based on dynamic threshold.
The ending date as a long value of the range of stats to return Long value is number of milliseconds since January 1, 1970 00:00:00 UTC NOTE: The ending date must not be less than the beginning date. If not provided, current time as UTC milliseconds is used
The type of grouping, if not set defaults to ResourceStatGroupBy.RESOURCE
Possible values are: RESOURCE , STATKEY
Number for the interval type
Interval type requested by the user (e.g: Days, Weeks, Months etc.)
Possible values are: HOURS , MINUTES , SECONDS , DAYS , WEEKS , MONTHS , YEARS
The maximum number of samples to return when querying latest. When processing the get latest stats query if it is omitted a value of 1 is assumed. A query for the latest samples is not compatible with specifying the RollUpType value.
Indicates whether specified statKey-s of query should be forcibly treated as metrics (does not include instanced stats)
Array of Resource ids for which the stats should be fetched
Rollup Type requested by the user (e.g.: AVG, MIN, MAX etc.)
Possible values are: SUM , AVG , MIN , MAX , NONE , LATEST , COUNT
The type of sorting, if not set defaults to ResourceStatSort.ASCENDING
Possible values are: ASCENDING , DESCENDING
Array of stat keys for which the stats should be returned
The number of results. Keep in mind if a grouping contains multiple items (eg: grouped by resource, with 4 metrics for the grouping resource) then returning the group with 4 metrics counts as 4 topN entries. If there are not enough remaining open topN entries to return an entire group within the topN then the entire group is not returned. *
Indicates whether stat values should be wrapped for application/xml response content type. This flag is false by default and not needed for application/json response. If set to true “statValues” will be returned instead of “values” for all content types.
Authentication
Response
Response BodyResponse Body
200 OK
TopN data keyed by each Resource identifier
{
"groupBy": "RESOURCE",
"resourceStatGroups": [
{
"groupKey": "string",
"links": [
{
"description": "string",
"href": "string",
"name": "string",
"rel": "NEXT"
}
],
"resourceStats": [
{
"links": [
{
"description": "string",
"href": "string",
"name": "string",
"rel": "NEXT"
}
],
"resourceId": "string",
"stat": {
"data": [
0
],
"dtTimestamps": [
0
],
"intervalUnit": {
"intervalType": "HOURS",
"quantifier": 0
},
"links": [
{
"description": "string",
"href": "string",
"name": "string",
"rel": "NEXT"
}
],
"maxThresholdData": [
0
],
"minThresholdData": [
0
],
"rollUpType": "SUM",
"smoothValues": [
0
],
"statKey": {
"key": "string"
},
"statValues": [
"string"
],
"timestamps": [
0
],
"values": [
"string"
]
}
}
]
}
],
"sortOrder": "ASCENDING"
}
Possible values are: RESOURCE , STATKEY
Possible values are: ASCENDING , DESCENDING